chore(deps): update mozilla-actions/sccache-action action to v0.0.6 #335
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: | |
types: | |
- opened | |
- synchronize | |
env: | |
MSRV: '1.64.0' | |
# Set up sccache with GitHub Actions cache | |
RUSTC_WRAPPER: sccache | |
SCCACHE_GHA_ENABLED: true | |
jobs: | |
msrv_check: | |
name: MSRV check | |
runs-on: ubuntu-22.04 | |
# Exclude in-repo PRs from running this job | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork | |
steps: | |
- name: 📥 Checkout source | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
with: | |
submodules: recursive | |
- name: 🧰 Install MSRV toolchain | |
uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1 | |
with: | |
toolchain: ${{ env.MSRV }} | |
- name: 💨 Set up sccache | |
uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6 | |
- name: ⚙️ Run tests | |
run: cargo test -p ogg_next_sys -p aotuv_lancer_vorbis_sys -p vorbis_rs | |
ci: | |
strategy: | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
- aarch64-unknown-linux-gnu | |
- x86_64-pc-windows-gnu | |
- x86_64-apple-darwin | |
include: | |
- target: x86_64-unknown-linux-gnu | |
runner: ubuntu-22.04 | |
packages-to-test: -p ogg_next_sys -p aotuv_lancer_vorbis_sys -p vorbis_rs | |
- target: aarch64-unknown-linux-gnu | |
runner: ubuntu-22.04 | |
packages-to-test: -p ogg_next_sys -p aotuv_lancer_vorbis_sys -p vorbis_rs | |
- target: x86_64-pc-windows-gnu | |
runner: windows-2022 | |
# Low-level FFI binding crates mostly contain layout tests | |
# that assume a Unix-like platform, so they won't work | |
# on Windows | |
packages-to-test: -p vorbis_rs | |
- target: x86_64-apple-darwin | |
runner: macos-13 | |
packages-to-test: -p ogg_next_sys -p aotuv_lancer_vorbis_sys -p vorbis_rs | |
name: CI (${{ matrix.target }}) | |
runs-on: ${{ matrix.runner }} | |
# Exclude in-repo PRs from running this job | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork | |
steps: | |
- name: 📥 Checkout source | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
with: | |
submodules: recursive | |
- name: 🧰 Install Rust toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
target: ${{ matrix.target }} | |
components: rust-src, rustfmt, clippy | |
- name: 🧰 Install ARM64 cross-compilation toolchain | |
if: matrix.target == 'aarch64-unknown-linux-gnu' | |
run: sudo apt update && sudo apt install -yq gcc-aarch64-linux-gnu libc6-arm64-cross qemu-user | |
- name: 💨 Set up sccache | |
uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6 | |
- name: '🔍 Static analysis: run Clippy' | |
uses: giraffate/clippy-action@13b9d32482f25d29ead141b79e7e04e7900281e0 # v1 | |
if: matrix.target == 'x86_64-unknown-linux-gnu' | |
with: | |
clippy_flags: --no-deps -- -D warnings | |
reporter: github-check | |
fail_on_error: true | |
- name: '🔍 Static analysis: run rustfmt' | |
if: matrix.target == 'x86_64-unknown-linux-gnu' | |
run: cargo fmt --check --all | |
- name: ✔️ Run tests | |
env: | |
# Handle AArch64 dynamic libraries installed by libc6-arm64-cross | |
# being in a path that the dynamic linker does not check by default | |
LD_LIBRARY_PATH: /usr/aarch64-linux-gnu/lib | |
run: cargo test --release --target ${{ matrix.target }} -Zdoctest-xcompile | |
${{ matrix.packages-to-test }} -- --nocapture |