Hyper v1 #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: LLRT CI | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
# Only run on the latest ref | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy, rustfmt | |
- name: Cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.lock') }} | |
- name: Format | |
run: cargo fmt --all -- --check | |
build: | |
needs: | |
- check | |
strategy: | |
fail-fast: ${{ startsWith(github.ref, 'refs/tags/') }} | |
matrix: | |
include: | |
- os: ubuntu-latest | |
platform: linux | |
arch: x86_64 | |
- os: ubuntu-latest | |
platform: linux | |
arch: aarch64 | |
- os: macos-latest | |
platform: darwin | |
arch: x86_64 | |
- os: macos-latest | |
platform: darwin | |
arch: aarch64 | |
# - os: windows-latest | |
# platform: windows | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
node-version: lts/* | |
- name: Install Linux dependencies | |
if: matrix.platform == 'linux' | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install make nodejs | |
sudo snap install zig --classic --beta | |
- name: Install MacOS dependencies | |
if: matrix.platform == 'darwin' | |
env: | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
run: | | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
brew install zig make | |
- name: Install Windows dependencies | |
if: matrix.platform == 'windows' | |
shell: pwsh | |
run: | | |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser | |
iex "& {$(irm get.scoop.sh)} -RunAsAdmin" | |
scoop install make zig | |
- name: Install JavaScript dependencies | |
run: | | |
corepack enable | |
yarn | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
- name: Apply patches | |
run: | | |
cargo install cargo-patch | |
cargo patch | |
- name: Run tests | |
if: matrix.arch != 'aarch64' || matrix.platform != 'linux' | |
run: | | |
make test-ci | |
- name: Run tests | |
if: matrix.arch == 'aarch64' && matrix.platform == 'linux' | |
env: | |
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUNNER: qemu-aarch64 | |
run: | | |
sudo apt-get install -y \ | |
qemu-system-arm \ | |
qemu-efi-aarch64 \ | |
qemu-utils \ | |
qemu-user | |
make CURRENT_TARGET=aarch64-unknown-linux-gnu test-ci |