Skip to content

Merge pull request #71 from kojix2/kojix2-patch-2 #96

Merge pull request #71 from kojix2/kojix2-patch-2

Merge pull request #71 from kojix2/kojix2-patch-2 #96

Workflow file for this run

name: Build and Test
on:
push:
branches:
- master
- staging
- trying
- 'prepare-*'
pull_request:
branches:
- '**'
jobs:
test:
name: Build and Test
strategy:
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1']
target:
- id: 'linux-amd64'
os: 'ubuntu-latest'
target-name: 'x86_64-unknown-linux-gnu'
rust-toolchain: 'stable'
- id: 'darwin-amd64'
os: 'macos-latest'
target-name: 'x86_64-apple-darwin'
rust-toolchain: 'stable'
# As soon as one job fails in the matrix, all the other
# in-progress jobs are canceled.
fail-fast: false
runs-on: ${{ matrix.target.os }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.target.rust-toolchain }}
default: true
override: true
target: ${{ matrix.target.target-name }}
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Set up just
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
test -f $HOME/.cargo/bin/just || cargo install just
- name: Compile the library
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
gem install rake
gem install bundler
just build
- name: Run the tests
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
just test-all