Skip to content

Feat/better mixer

Feat/better mixer #223

Workflow file for this run

name: test
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
required:
runs-on: ubuntu-latest
name: ubuntu / ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: [nightly]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Restore cached downloaded game
id: cache-ashen
uses: actions/cache@v4
with:
path: rom
key: ${{ runner.os }}-ashen
- name: Download the game
if: steps.cache-ashen.outputs.cache-hit != 'true'
run: |
mkdir "rom"
cd "rom"
wget "https://archive.org/download/Nokia_N-Gage_Ashen_v1.0.6_Windows_Build/Ashen_v1.0.6_Windows_Build_Files.zip" -O "game.zip"
unzip "game.zip" -d "ashen"
unzip "ashen/Dawn1.06.zip" -d "ashen/game"
cp "ashen/game/Dawn/PackFile.Dat" "packfile.dat"
rm -rf "ashen" "ashen.zip"
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Generate lock file
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
# https://twitter.com/jonhoo/status/1571290371124260865
- name: Test
run: cargo test --locked --all-features --all-targets
# https://github.com/rust-lang/cargo/issues/6669
- name: Doc tests
run: cargo test --locked --all-features --doc
- name: ROM - Deflate
run: cargo test --locked -- --ignored parse_rom_packfile
- name: ROM - Assets
run: cargo test --locked -- --ignored parse_rom_asset
env:
SKIP_TEST_WRITE: true
minimal:
runs-on: ubuntu-latest
name: ubuntu / nightly / direct-minimal-versions
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install nightly for -Z direct-minimal-versions
uses: dtolnay/rust-toolchain@nightly
- name: rustup default nightly
run: rustup default nightly
- name: cargo update -Z direct-minimal-versions
run: cargo update -Z direct-minimal-versions
- name: cargo test
run: cargo test --locked --all-features --all-targets
os-check:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / nightly
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
steps:
# if your project needs OpenSSL, uncommment this to fix Windows builds.
# it's commented out by default as tthe install command takes 5-10m.
# - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
# if: runner.os == 'Windows'
# - run: vcpkg install openssl:x64-windows-static-md
# if: runner.os == 'Windows'
- uses: actions/checkout@v4
with:
submodules: true
- name: Install nightly
uses: dtolnay/rust-toolchain@nightly
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo test
run: cargo test --locked --all-features --all-targets