summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-02-26 13:12:46 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-03-02 14:53:05 +0900
commit888e736524ad66369a7cbc065af4a1b5ed591c6a (patch)
tree439606b4929d8e19fae91e3e4302a9f8b643c1ee /.github
parente06ad731f03ab83b72c15f951d7a5a3c8ac4323c (diff)
.github: make use of working-directory
One can specify working directory of a step, no by `cd foo` inside of the run. See also https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2927
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/macos.yml32
-rw-r--r--.github/workflows/mingw.yml26
-rw-r--r--.github/workflows/mjit.yml38
-rw-r--r--.github/workflows/ubuntu.yml30
-rw-r--r--.github/workflows/windows.yml9
5 files changed, 68 insertions, 67 deletions
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index dcfc0bd587..9c3662232d 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -29,35 +29,31 @@ jobs:
- name: Install libraries
run: |
export WAITS='5 60'
- cd src
tool/travis_retry.sh brew upgrade
tool/travis_retry.sh brew install gdbm gmp libffi openssl@1.1 zlib autoconf automake libtool readline
+ working-directory: src
- name: Set ENV
run: |
echo '::set-env name=JOBS::'-j$((1 + $(sysctl -n hw.activecpu)))
- - name: Autoconf
- run: |
- cd src
- autoconf
- - name: Configure
- run: |
- mkdir build
- cd build
- ../src/configure -C --disable-install-doc --with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline)
- - name: Make
- run: make -C build $JOBS
- - name: Extract gems
- run: make -C build update-gems extract-gems
+ - run: autoconf
+ working-directory: src
+ - run: mkdir build
+ - run: ../src/configure -C --disable-install-doc --with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline)
+ working-directory: build
+ - run: make $JOBS
+ working-directory: build
+ - run: make update-gems extract-gems
+ working-directory: build
if: matrix.test_task == 'check'
- - name: Tests
- run: make -C build $JOBS -s ${{ matrix.test_task }}
+ - run: make $JOBS -s ${{ matrix.test_task }}
+ working-directory: build
env:
RUBY_TESTOPTS: "-q --tty=no"
# Remove minitest from TEST_BUNDLED_GEMS_ALLOW_FAILURES if https://github.com/seattlerb/minitest/pull/798 is resolved
# rss needs to add workaround for the non rexml environment
TEST_BUNDLED_GEMS_ALLOW_FAILURES: "minitest,xmlrpc,rss,rexml"
- - name: Leaked Globals
- run: make -C build -s leaked-globals
+ - run: make -s leaked-globals
+ working-directory: build
- uses: k0kubun/action-slack@v2.0.0
with:
payload: |
diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
index 508e01868f..3bdb2f6759 100644
--- a/.github/workflows/mingw.yml
+++ b/.github/workflows/mingw.yml
@@ -71,12 +71,12 @@ jobs:
sh -c "autoreconf -fi"
- name: configure
+ working-directory: build
run: |
# Actions uses UTF8, causes test failures, similar to normal OS setup
$PSDefaultParameterValues['*:Encoding'] = 'utf8'
[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
[Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
- cd build
$config_args = "--build=$env:CHOST --host=$env:CHOST --target=$env:CHOST"
Write-Host $config_args
sh -c "../src/configure --disable-install-doc --prefix=/install $config_args"
@@ -84,54 +84,58 @@ jobs:
# Get-Content ./config.log | foreach {Write-Output $_}
- name: download unicode, gems, etc
+ working-directory: build
run: |
$jobs = [int]$env:NUMBER_OF_PROCESSORS + 1
- cd build
make -j $jobs update-unicode
make -j $jobs update-gems
- name: make all
timeout-minutes: 20
+ working-directory: build
run: |
$jobs = [int]$env:NUMBER_OF_PROCESSORS + 1
- make -C build -j $jobs V=1
+ make -j $jobs V=1
- name: make install
+ working-directory: build
run: |
# Actions uses UTF8, causes test failures, similar to normal OS setup
$PSDefaultParameterValues['*:Encoding'] = 'utf8'
[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
[Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
- make -C build DESTDIR=.. install-nodoc
+ make DESTDIR=.. install-nodoc
- name: test
timeout-minutes: 5
+ working-directory: build
run: |
- $env:TMPDIR = "$pwd/temp"
- make -C build test
+ $env:TMPDIR = "$pwd/../temp"
+ make test
- name: test-all
timeout-minutes: 25
+ working-directory: build
run: |
- $env:TMPDIR = "$pwd/temp"
+ $env:TMPDIR = "$pwd/../temp"
# Actions uses UTF8, causes test failures, similar to normal OS setup
$PSDefaultParameterValues['*:Encoding'] = 'utf8'
[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
[Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
$jobs = [int]$env:NUMBER_OF_PROCESSORS
- make -C build test-all TESTOPTS="-j $jobs --retry --job-status=normal --show-skip --timeout-scale=1.5"
+ make test-all TESTOPTS="-j $jobs --retry --job-status=normal --show-skip --timeout-scale=1.5"
- name: test-spec
timeout-minutes: 10
+ working-directory: src/spec/ruby
run: |
- $env:TMPDIR = "$pwd/temp"
- $env:PATH = "$pwd/install/bin;$env:PATH"
+ $env:TMPDIR = "$pwd/../temp"
+ $env:PATH = "$pwd/../install/bin;$env:PATH"
# Actions uses UTF8, causes test failures, similar to normal OS setup
$PSDefaultParameterValues['*:Encoding'] = 'utf8'
[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
[Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
ruby -v
- cd src/spec/ruby
ruby ../mspec/bin/mspec -j
- uses: k0kubun/action-slack@v2.0.0
diff --git a/.github/workflows/mjit.yml b/.github/workflows/mjit.yml
index b3d7fd1799..a71518d228 100644
--- a/.github/workflows/mjit.yml
+++ b/.github/workflows/mjit.yml
@@ -9,6 +9,9 @@ jobs:
fail-fast: false
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
+ env:
+ TESTOPTS: '-q --tty=no'
+ RUN_OPTS: '--disable-gems --jit-warnings ${{ matrix.jit_opts }}'
steps:
- name: Install libraries
run: |
@@ -35,25 +38,24 @@ jobs:
- name: Set ENV
run: |
echo '::set-env name=JOBS::'-j$((1 + $(nproc --all)))
- - name: Autoconf
- run: cd src && exec autoconf
+ - run: autoconf
+ working-directory: src
+ - run: mkdir build
- name: configure
- run: |
- mkdir build
- cd build
- ../src/configure -C --disable-install-doc
- - name: make all
- run: make -C build $JOBS
- - name: make install
- run: sudo make -C build $JOBS install
- - name: make test
- run: "make -C build $JOBS -s test TESTOPTS='-q --tty=no' RUN_OPTS='--disable-gems --jit-warnings ${{ matrix.jit_opts }}'"
- - name: make test-all
- run: "make -C build $JOBS -s test-all TESTOPTS='-q --tty=no' RUN_OPTS='--disable-gems --jit-warnings ${{ matrix.jit_opts }}'"
- - name: make test-spec
- run: "make -C build $JOBS -s test-spec RUN_OPTS='--disable-gems --jit-warnings ${{ matrix.jit_opts }}'"
- - name: Leaked Globals
- run: make -C build -s leaked-globals
+ run: ../src/configure -C --disable-install-doc
+ working-directory: build
+ - run: make $JOBS
+ working-directory: build
+ - run: sudo make $JOBS -s install
+ working-directory: build
+ - run: make $JOBS -s test
+ working-directory: build
+ - run: make $JOBS -s test-all
+ working-directory: build
+ - run: make $JOBS -s test-spec
+ working-directory: build
+ - run: make -s leaked-globals
+ working-directory: build
- uses: k0kubun/action-slack@v2.0.0
with:
payload: |
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 0246689ccf..f448f20633 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -42,32 +42,30 @@ jobs:
- name: Set ENV
run: |
echo '::set-env name=JOBS::'-j$((1 + $(nproc --all)))
- - name: Autoconf
- run: cd src && exec autoconf
- - name: configure
- run: |
- mkdir build
- cd build
- ../src/configure -C --disable-install-doc
- - name: Make
- run: make -C build $JOBS
- - name: Extract gems
- run: make -C build update-gems extract-gems
+ - run: autoconf
+ working-directory: src
+ - run: mkdir build
+ - run: ../src/configure -C --disable-install-doc
+ working-directory: build
+ - run: make $JOBS
+ working-directory: build
+ - run: make update-gems extract-gems
+ working-directory: build
if: matrix.test_task == 'check'
- name: Create dummy files in build dir
run: |
- cd build
./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'
- - name: Tests
- run: make -C build $JOBS -s ${{ matrix.test_task }}
+ - run: make $JOBS -s ${{ matrix.test_task }}
+ working-directory: build
env:
RUBY_TESTOPTS: "-q --tty=no"
# Remove minitest from TEST_BUNDLED_GEMS_ALLOW_FAILURES if https://github.com/seattlerb/minitest/pull/798 is resolved
# rss needs to add workaround for the non rexml environment
TEST_BUNDLED_GEMS_ALLOW_FAILURES: "minitest,xmlrpc,rss"
- - name: Leaked Globals
- run: make -C build -s leaked-globals
+ - run: make -s leaked-globals
+ working-directory: build
- uses: k0kubun/action-slack@v2.0.0
with:
payload: |
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index c2f8f7490a..ed2079a610 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -46,28 +46,29 @@ jobs:
- run: ./src/tool/actions-commit-info.sh
shell: bash
id: commit_info
+ - run: md build
+ shell: cmd
- name: Configure
run: |
- md build
- cd build
call "C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
../src/win32/configure.bat --disable-install-doc --without-ext=+,dbm,gdbm --enable-bundled-libffi --with-opt-dir=C:/vcpkg/installed/x64-windows --with-openssl-dir="C:/Program Files/OpenSSL-Win64"
+ working-directory: build
shell: cmd
- name: nmake
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set YACC=win_bison
- cd build
echo on
nmake up
nmake extract-gems
nmake
+ working-directory: build
shell: cmd
- name: nmake test
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
- cd build
nmake ${{ matrix.test_task }}
+ working-directory: build
shell: cmd
- uses: k0kubun/action-slack@v2.0.0
with: