forked from fastruby/fast-ruby
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (42 loc) · 1.25 KB
/
ruby.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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 "[email protected]"
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 }}