Merge pull request #106 from theseus-rs/remove-custom-formats #316
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: ci | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
checks: | |
name: Checks | |
uses: ./.github/workflows/checks.yml | |
build: | |
name: ${{ matrix.platform }} | |
needs: [ checks ] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- linux-arm | |
- linux-x64 | |
- macos-arm | |
- macos-x64 | |
- windows-x64 | |
- wasm32-unknown | |
- wasm32-wasi | |
include: | |
- platform: linux-arm | |
os: ubuntu-24.04-arm | |
target: aarch64-unknown-linux-gnu | |
- platform: linux-x64 | |
os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
- platform: macos-arm | |
os: macos-15 | |
target: aarch64-apple-darwin | |
- platform: macos-x64 | |
os: macos-13 | |
target: x86_64-apple-darwin | |
- platform: windows-x64 | |
os: windows-2022 | |
target: x86_64-pc-windows-msvc | |
- platform: wasm32-unknown | |
os: ubuntu-latest | |
target: wasm32-unknown-unknown | |
- platform: wasm32-wasi | |
os: ubuntu-latest | |
target: wasm32-wasip1-threads | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
targets: ${{ matrix.target }} | |
toolchain: stable | |
- name: Install cargo-llvm-cov | |
if: ${{ startsWith(matrix.platform, 'linux-') }} | |
uses: taiki-e/install-action@main | |
with: | |
tool: cargo-llvm-cov | |
- name: Build | |
if: ${{ startsWith(matrix.platform, 'wasm32-') }} | |
env: | |
CARGO_TERM_COLOR: always | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
RUST_BACKTRACE: 1 | |
RUST_LOG: info | |
run: | | |
rustup target install ${{ matrix.target }} | |
cargo build --package file_type --target ${{ matrix.target }} | |
- name: Test | |
if: ${{ matrix.platform != 'linux-x64' && !startsWith(matrix.platform, 'wasm32-') }} | |
env: | |
CARGO_TERM_COLOR: always | |
DRY_RUN: true | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
MAX_FMT_PUID: 1 | |
MAX_X_FMT_PUID: 1 | |
RUST_BACKTRACE: 1 | |
RUST_LOG: info | |
run: | | |
cargo test --workspace --all-features | |
- name: Test | |
if: ${{ matrix.platform == 'linux-x64' }} | |
env: | |
CARGO_TERM_COLOR: always | |
DRY_RUN: true | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
MAX_FMT_PUID: 1 | |
MAX_X_FMT_PUID: 1 | |
RUST_BACKTRACE: 1 | |
RUST_LOG: info | |
RUST_LOG_SPAN_EVENTS: full | |
run: | | |
cargo llvm-cov --workspace --all-features --lcov --output-path lcov.info | |
- name: Upload to codecov.io | |
if: ${{ startsWith(matrix.platform, 'linux-') }} | |
uses: codecov/codecov-action@v5 | |
with: | |
files: lcov.info | |
fail_ci_if_error: true | |
verbose: true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |