ci(build): update build_linux job
#9
Workflow file for this run
This file contains hidden or 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: Build | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| - main | |
| - release-* | |
| - feat-* | |
| - ci-* | |
| - refactor-* | |
| - fix-* | |
| - test-* | |
| paths: | |
| - '.github/workflows/build.yml' | |
| - '**/Cargo.toml' | |
| - '**/*.rs' | |
| - '**/*.sh' | |
| pull_request: | |
| branches: | |
| - dev | |
| - main | |
| types: [opened, synchronize, reopened] | |
| paths: | |
| - '.github/workflows/**' | |
| - '**/Cargo.toml' | |
| - '**/*.rs' | |
| - '**/*.sh' | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone project | |
| uses: actions/checkout@v3 | |
| - name: Install Rust-nightly | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| components: rustfmt, clippy | |
| - name: Run clippy | |
| run: | | |
| cargo +nightly clippy --all-features -- -D warnings | |
| - name: Run fmt | |
| run: | | |
| cargo +nightly fmt --all -- --check | |
| build_macos: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-13, macos-14, macos-15] | |
| steps: | |
| - name: Clone project | |
| id: checkout | |
| uses: actions/checkout@v3 | |
| - name: Install Rust-stable | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Build | |
| run: | | |
| cargo build --release | |
| build_linux: | |
| runs-on: ${{ matrix.os }} | |
| container: | |
| image: ${{ matrix.image }} | |
| strategy: | |
| matrix: | |
| build: [linux-x86_64] | |
| include: | |
| - build: linux-x86_64 | |
| os: ubuntu-22.04 | |
| image: ubuntu:20.04 | |
| target: x86_64-unknown-linux-gnu | |
| # - build: linux-aarch64 | |
| # os: ubuntu-22.04-arm | |
| # image: arm64v8/ubuntu:20.04 | |
| # target: aarch64-unknown-linux-gnu | |
| fail-fast: false | |
| steps: | |
| - name: Clone project | |
| id: checkout | |
| uses: actions/checkout@v3 | |
| - name: Install dependencies silently | |
| run: | | |
| export DEBIAN_FRONTEND=noninteractive | |
| apt update && apt install -y curl build-essential pkg-config cmake clang nasm ninja-build git | |
| - name: Install Rust-stable | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Build | |
| run: | | |
| cargo build --release --target ${{ matrix.target }} | |