From 671c5e48de4cedbd7ad8a1b3631a9d60b4cae23d Mon Sep 17 00:00:00 2001 From: Michael Grosser Date: Thu, 25 May 2023 22:16:21 -0700 Subject: [PATCH] try to setup dev env --- .dockerignore | 4 ++++ .github/PULL_REQUEST_TEMPLATE.md | 5 +++++ .github/workflows/actions.yml | 20 ++++++++++++++++++++ Dockerfile | 18 ++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 .dockerignore create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/actions.yml create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2f1b719 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +vendor +pkg +Dockerfile +.github diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..0490a1c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,5 @@ +Thank you for your contribution! + +## Checklist +- [ ] Added tests +- [ ] Updated README.md (if user facing behavior changed) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml new file mode 100644 index 0000000..c156754 --- /dev/null +++ b/.github/workflows/actions.yml @@ -0,0 +1,20 @@ +name: CI +on: + push: + branches: [master] + pull_request: + branches: [master] +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: ['2.7', '3.0', '3.1', '3.2'] + name: ${{ matrix.ruby }} rake + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - run: bundle exec rake diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d2812c9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM ruby:3.2 + +# cache gems +COPY lib lib +COPY cld.gemspec Gemfile Gemfile.lock ./ +RUN bundle + +# copy rest +COPY ext ext +COPY spec spec +COPY .rspec Rakefile ./ + +# install cld +RUN git clone https://github.com/mzsanford/cld.git +RUN cd cld && libtoolize && ./configure && aclocal && automake --add-missing && make && make install +# RUN cd cld && autoreconf -f -i -Wall,no-obsolete && ./configure && make && make install + +#RUN rake