summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-03-10 08:23:36 +0900
committerGitHub <noreply@github.com>2023-03-10 08:23:36 +0900
commit1cf4720a6f4a1acbead270405609afb783eebd07 (patch)
tree6d45b1fa4c1a95f99498eb9e88444d5cb8523abf
parent6f2b16b343ff78f73093b0a8634ead3d173549cf (diff)
parent722d3fbda1640eb956766d1f8668d42ce6e5e450 (diff)
downloadpsych-1cf4720a6f4a1acbead270405609afb783eebd07.tar.gz
Merge pull request #622 from ruby/use-callable-workflow
Use callable workflow
-rw-r--r--.github/workflows/libyaml.yml9
-rw-r--r--.github/workflows/macos.yml26
-rw-r--r--.github/workflows/ubuntu-jruby.yml23
-rw-r--r--.github/workflows/ubuntu.yml30
-rw-r--r--.github/workflows/windows.yml28
5 files changed, 29 insertions, 87 deletions
diff --git a/.github/workflows/libyaml.yml b/.github/workflows/libyaml.yml
index ea25f57..90f768e 100644
--- a/.github/workflows/libyaml.yml
+++ b/.github/workflows/libyaml.yml
@@ -3,12 +3,19 @@ name: libyaml
on: [push, pull_request]
jobs:
+ ruby-versions:
+ uses: ruby/actions/.github/workflows/ruby_versions.yml@master
+ with:
+ engine: cruby
+ min_version: 2.4
+
build:
+ needs: ruby-versions
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- ruby: [ head, 3.1, "3.0", 2.7, 2.6, 2.5, 2.4 ]
+ ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
libyaml: [0.1.7, 0.2.5]
libyaml-prefix: [/tmp/local, '']
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
deleted file mode 100644
index ddca074..0000000
--- a/.github/workflows/macos.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: macos
-
-on: [push, pull_request]
-
-jobs:
- build:
- runs-on: macos-latest
- strategy:
- fail-fast: false
- matrix:
- ruby: [ head, 3.1, "3.0", 2.7, 2.6, 2.5, 2.4 ]
- steps:
- - uses: actions/checkout@v3
- - name: Install libraries
- run: brew install libyaml
- - name: Set up Ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: ${{ matrix.ruby }}
- - name: Install dependencies
- run: bundle install
- - name: Run test
- run: rake
- - name: Install gem
- run: rake install
- if: ${{ matrix.ruby != 'head' }}
diff --git a/.github/workflows/ubuntu-jruby.yml b/.github/workflows/ubuntu-jruby.yml
deleted file mode 100644
index 7fadea2..0000000
--- a/.github/workflows/ubuntu-jruby.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: ubuntu-jruby
-
-on: [push, pull_request]
-
-jobs:
- build:
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- ruby: [ jruby, jruby-head ]
- steps:
- - uses: actions/checkout@v3
- - name: Set up Ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: ${{ matrix.ruby }}
- - name: Install dependencies
- run: bundle install --jobs 1
- - name: compile
- run: bundle exec rake compile
- - name: test
- run: bundle exec rake test
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index aae555e..a31078b 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -1,26 +1,38 @@
-name: ubuntu
+name: test
on: [push, pull_request]
jobs:
- build:
- runs-on: ubuntu-latest
+ ruby-versions:
+ uses: ruby/actions/.github/workflows/ruby_versions.yml@master
+ with:
+ engine: cruby-jruby
+ min_version: 2.4
+
+ test:
+ needs: ruby-versions
+ runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
- ruby: [ head, 3.1, "3.0", 2.7, 2.6, 2.5, 2.4 ]
+ ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
+ os: [ ubuntu-latest, macos-latest, windows-latest ]
+ include:
+ - { os: windows-latest, ruby: ucrt }
+ - { os: windows-latest, ruby: mingw }
+ - { os: windows-latest, ruby: mswin }
steps:
- - name: Install libraries
- run: sudo apt install haveged libyaml-dev
- uses: actions/checkout@v3
- name: Set up Ruby
- uses: ruby/setup-ruby@v1
+ uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{ matrix.ruby }}
+ apt-get: "haveged libyaml-dev"
+ brew: libyaml
+ vcpkg: libyaml
- name: Install dependencies
- run: bundle install
+ run: bundle install --jobs 1
- name: Run test
run: rake
- name: Install gem
run: rake install
- if: ${{ matrix.ruby != 'head' }}
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
deleted file mode 100644
index 37e80ce..0000000
--- a/.github/workflows/windows.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-name: windows
-
-on: [push, pull_request]
-
-jobs:
- build:
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- ruby: [ ucrt, mingw, mswin, 3.1, "3.0", 2.7, 2.6, 2.5, 2.4 ]
- os: [ windows-latest ]
- steps:
- - uses: actions/checkout@v3
- - name: Set up Ruby
- uses: ruby/setup-ruby-pkgs@v1
- with:
- ruby-version: ${{ matrix.ruby }}
- vcpkg: libyaml
- - name: Install dependencies
- run: bundle install
- - name: Run test
- run: rake
- - name: Install gem
- run: rake install
- # use all possible head strings
- if: |
- !(contains('ucrt mingw mswin head', matrix.ruby))