ci: run tests in release mode #53
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: Main Branch | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "gh-pages/**" | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
- os: ubuntu-latest | |
target: i686-unknown-linux-gnu | |
- os: ubuntu-latest | |
target: aarch64-unknown-linux-gnu | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
- os: windows-latest | |
target: i686-pc-windows-msvc | |
- os: windows-latest | |
target: aarch64-pc-windows-msvc | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- name: Install dependencies (macOS) | |
if: matrix.os == 'macos-latest' | |
run: brew install openssl | |
- name: Install dependencies (Linux x86_32) | |
if: matrix.os == 'ubuntu-latest' && matrix.target == 'i686-unknown-linux-gnu' | |
run: sudo apt-get install -y gcc-multilib | |
- name: Install dependencies (Linux aarch64) | |
if: matrix.os == 'ubuntu-latest' && matrix.target == 'aarch64-unknown-linux-gnu' | |
run: sudo apt-get install -y gcc-aarch64-linux-gnu | |
- name: Build | |
run: cargo build --release --target ${{ matrix.target }} | |
- name: Check i18n | |
shell: bash | |
run: scripts/find-missing-i18n.sh | |
- name: Check formatting | |
run: cargo fmt -- --check | |
- name: Check clippy | |
shell: bash | |
run: | | |
cargo clippy --release --all-targets --all-features -- \ | |
-D clippy::suspicious -D clippy::style -D clippy::complexity \ | |
-D clippy::perf -D clippy::dbg_macro -D clippy::todo \ | |
-D clippy::unimplemented -D warnings | |
- name: Test | |
if: always() && (matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu') || (matrix.os == 'windows-latest' && matrix.target == 'x86_64-pc-windows-msvc') || (matrix.os == 'macos-latest' && matrix.target == 'x86_64-apple-darwin') | |
run: cargo test --release --target ${{ matrix.target }} |