diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-10-19 15:32:39 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-10-21 09:24:47 +0900 |
commit | da25affdacc45dd54a1d4c12a5f8394145811276 (patch) | |
tree | 72ebfddce08ad5756d14a9af87134978ee5494d7 /.github/workflows/ubuntu.yml | |
parent | 1c5f44cd728e8c42fd99a74151752e2980e65d0f (diff) | |
download | ruby-da25affdacc45dd54a1d4c12a5f8394145811276.tar.gz |
.github: reduce copy&paste
Found that we can set default working directory for github actions.
Diffstat (limited to '.github/workflows/ubuntu.yml')
-rw-r--r-- | .github/workflows/ubuntu.yml | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index a5132ad053..38649d3f67 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -29,6 +29,8 @@ jobs: runs-on: ${{ matrix.os }} if: "!contains(github.event.head_commit.message, '[ci skip]')" steps: + - run: mkdir build + working-directory: - name: Install libraries run: | set -x @@ -50,25 +52,18 @@ jobs: echo "JOBS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV - run: autoconf working-directory: src - - run: mkdir build - name: Run configure run: ../src/configure -C --disable-install-doc cppflags=${{ matrix.debug }} - working-directory: build - run: make $JOBS incs - working-directory: build - run: make $JOBS - working-directory: build - run: make prepare-gems - working-directory: build if: matrix.test_task == 'check' - name: Create dummy files in build dir run: | ./miniruby -e '(("a".."z").to_a+("A".."Z").to_a+("0".."9").to_a+%w[foo bar test zzz]).each{|basename|File.write("#{basename}.rb", "raise %(do not load #{basename}.rb)")}' - working-directory: build if: matrix.test_task == 'check' - run: make $JOBS -s ${{ matrix.test_task }} timeout-minutes: 30 - working-directory: build env: RUBY_TESTOPTS: "-q --tty=no" TEST_BUNDLED_GEMS_ALLOW_FAILURES: "" @@ -85,3 +80,7 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: failure() && github.event_name == 'push' + +defaults: + run: + working-directory: build |