CI #172
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [master] | |
schedule: | |
- cron: "0 13 * * 1" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: build ${{ matrix.ruby }} | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: [truffleruby-head, '3.1'] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Test | |
continue-on-error: ${{ matrix.experimental }} | |
run: BENCHMARK_IPS_FORCE_WARMUP=10 bundle exec rake > $(ruby -e'puts "#{RUBY_ENGINE}-#{RUBY_VERSION}.fastruby"') | |
- name: Commit files | |
id: commit | |
run: | | |
git pull | |
git config --local user.email "action@github.com" | |
git config --local user.name "github-actions" | |
git add *.fastruby | |
if [-z "$(git status --porcelain)"]; then | |
echo "::set-output name=push::false" | |
else | |
git commit -m "Add changes" -a | |
echo "::set-output name=push::true" | |
fi | |
shell: bash | |
- name: Push changes | |
if: steps.commit.outputs.push == 'true' | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |