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/compilers.yml | |
| parent | 1c5f44cd728e8c42fd99a74151752e2980e65d0f (diff) | |
.github: reduce copy&paste
Found that we can set default working directory for github actions.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3675
Diffstat (limited to '.github/workflows/compilers.yml')
| -rw-r--r-- | .github/workflows/compilers.yml | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 88b6c3ac51..17211b5e1e 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -159,18 +159,18 @@ jobs: container: ghcr.io/ruby/ruby-ci-image:latest if: "!contains(github.event.head_commit.message, '[ci skip]')" steps: + - run: mkdir build + working-directory: - name: setenv run: | echo "${{ matrix.entry.key }}=${{ matrix.entry.value }}" >> $GITHUB_ENV echo "make=make -sj$((1 + $(nproc --all)))" >> $GITHUB_ENV - - run: mkdir build - uses: actions/checkout@v2 with: path: src - run: autoconf working-directory: src - name: Run configure - working-directory: build run: | if [ -n "${crosshost}" ]; then ../src/configure -C \ @@ -184,27 +184,18 @@ jobs: --with-gcc="${default_cc} ${append_cc}" fi - run: $make extract-extlibs - working-directory: build - run: $make incs - working-directory: build - run: $make - working-directory: build - run: $make test - working-directory: build - run: $make install - working-directory: build if: "matrix.entry.name == '-O3'" - run: /usr/local/bin/gem install --no-doc timezone tzinfo - working-directory: build if: "matrix.entry.name == '-O3'" - run: $make test-tool - working-directory: build if: "matrix.entry.name == '-O3'" - run: $make test-all TESTS='-- ruby -ext-' - working-directory: build if: "matrix.entry.name == '-O3'" - run: $make test-spec - working-directory: build if: "matrix.entry.name == '-O3'" - uses: k0kubun/action-slack@v2.0.0 @@ -220,3 +211,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 |
