aa #91
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] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
name: Neqo Build and Test | |
strategy: | |
# fail-fast: false | |
matrix: | |
os: [windows-latest] # ubuntu-latest, macos-latest] # | |
rust-toolchain: [stable] # , 1.65.0, beta] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust-toolchain }} | |
components: rustfmt, clippy | |
# cache: false # enabling the cache leads to spurious failures | |
- name: Install dependencies (Linux) | |
if: runner.os == 'Linux' | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends gyp mercurial ninja-build | |
- name: Install dependencies (MacOS) | |
if: runner.os == 'MacOS' | |
run: | | |
brew install ninja mercurial | |
python3 -m pip install gyp-next | |
export PATH="$(python3 -m site --user-base)/bin:$PATH" | |
- name: Cache dependencies (Windows) | |
if: runner.os == 'Windows' | |
id: cache-mozbuild | |
uses: actions/cache@v3 | |
with: | |
path: "C:\\mozilla-build" | |
key: ${{ runner.os }}-mozbuild | |
- name: Install dependencies (Windows) | |
if: runner.os == 'Windows' && steps.cache-mozbuild.outputs.cache-hit != 'true' | |
shell: bash | |
run: | | |
choco install --no-progress MozillaBuild | |
cat "C:\ProgramData\chocolatey\logs\chocolatey.log" | |
echo "C:\mozilla-build\bin" >> $GITHUB_PATH | |
echo "C:\mozilla-build/msys2/usr/bin" >> $GITHUB_PATH | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
# shell: bash | |
run: cargo +${{ matrix.rust-toolchain }} build -v --tests | |
env: | |
MOZILLABUILD: "C:\\mozilla-build" | |
MOZBUILD_STATE_PATH: ${{ github.workspace }}/.mozbuild | |
CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG: true | |
- name: Run tests | |
run: cargo +${{ matrix.rust-toolchain }} test -v | |
env: | |
RUST_BACKTRACE: 1 | |
RUST_LOG: neqo=debug | |
- name: Check formatting | |
run: cargo +${{ matrix.rust-toolchain }} fmt --all -- --check | |
if: ${{ success() || failure() }} | |
- name: Clippy | |
run: cargo +${{ matrix.rust-toolchain }} clippy -v --tests -- -D warnings | |
if: ${{ success() || failure() }} |