Generate Inventory & Sha7 appended filenames for binaries #232
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
- push | |
- pull_request | |
jobs: | |
shellcheck: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run ShellCheck | |
run: shellcheck *.sh -x | |
lint: | |
runs-on: ubuntu-24.04 | |
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-24.04 | |
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-24.04-arm-medium' || 'ubuntu-24.04' }} | |
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-24.04-arm-medium' || 'ubuntu-24.04' }} | |
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}} | |
check_inventory_urls: | |
runs-on: ubuntu-24.04 | |
if: (!contains(github.event.pull_request.labels.*.name, 'skip inventory check')) | |
strategy: | |
matrix: | |
inventory: ["jruby_inventory.toml", "ruby_inventory.toml"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Grab prior commits | |
run: | | |
set -eu | |
set pipefail | |
git fetch origin ${{ github.base_ref }} --depth 1 && \ | |
git diff --unified=0 remotes/origin/${{ github.base_ref }} ${{matrix.inventory}} | grep '^+' | grep -v '^+++' | cut -c2- > check_inventory.toml | |
- name: Check manifest URLs | |
run: cargo run --bin inventory_check -- check_inventory.toml |