diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/libyaml.yml | 9 | ||||
-rw-r--r-- | .github/workflows/macos.yml | 26 | ||||
-rw-r--r-- | .github/workflows/ubuntu-jruby.yml | 23 | ||||
-rw-r--r-- | .github/workflows/ubuntu.yml | 30 | ||||
-rw-r--r-- | .github/workflows/windows.yml | 28 |
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)) |