Skip to content

Fix output directory in GitHub Actions (#48) #199

Fix output directory in GitHub Actions (#48)

Fix output directory in GitHub Actions (#48) #199

Workflow file for this run

name: CI
on:
- push
- pull_request
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run ShellCheck
run: shellcheck *.sh -x
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust toolchain
# Most of the time this will be a no-op, since GitHub releases new images every week
# which include the latest stable release of Rust, Rustup, Clippy and rustfmt.
run: rustup update
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Clippy
# Using --all-targets so tests are checked and --deny to fail on warnings.
# Not using --locked here and below since Cargo.lock is in .gitignore.
run: cargo clippy --all-targets --all-features -- --deny warnings
- name: rustfmt
run: cargo fmt -- --check
- name: Check docs
# Using RUSTDOCFLAGS until `cargo doc --check` is stabilised:
# https://github.com/rust-lang/cargo/issues/10025
run: RUSTDOCFLAGS="-D warnings" cargo doc --all-features --document-private-items --no-deps
unit-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust toolchain
run: rustup update
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Run unit tests
run: cargo test --all-features
ruby_integration_test:
runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-22.04-arm-medium' || 'ubuntu-latest' }}
strategy:
matrix:
base_image: ["heroku-20", "heroku-22", "heroku-24"]
version: ["3.2.3"]
arch: ["arm64", "amd64"]
exclude:
- base_image: "heroku-20"
arch: "arm64"
- base_image: "heroku-22"
arch: "arm64"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust toolchain
run: rustup update
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Cargo build (to make test logs shorter)
run: cargo build
- name: Output CHANGELOG
run: cargo run --bin ruby_changelog -- --version "${{matrix.version}}"
- name: Build Ruby
run: cargo run --bin ruby_build -- --version ${{matrix.version}} --base-image ${{matrix.base_image}} --arch ${{matrix.arch}}
- name: Check Ruby
run: cargo run --bin ruby_check -- --version ${{matrix.version}} --base-image ${{matrix.base_image}} --arch ${{matrix.arch}}
jruby_integration_test:
runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-22.04-arm-medium' || 'ubuntu-latest' }}
strategy:
matrix:
base_image: ["heroku-20", "heroku-22", "heroku-24"]
version: ["9.4.7.0"]
arch: ["arm64", "amd64"]
exclude:
- base_image: "heroku-20"
arch: "arm64"
- base_image: "heroku-22"
arch: "arm64"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust toolchain
run: rustup update
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Cargo build (to make test logs shorter)
run: cargo build
- name: Output CHANGELOG
run: cargo run --bin jruby_changelog -- --version "${{matrix.version}}"
- name: Build JRuby
run: cargo run --bin jruby_build -- --version ${{matrix.version}} --base-image ${{matrix.base_image}}
- name: Check JRuby
run: cargo run --bin jruby_check -- --version ${{matrix.version}} --base-image ${{matrix.base_image}} --arch ${{matrix.arch}}