Skip to content

build: add linux arm ci build #912

build: add linux arm ci build

build: add linux arm ci build #912

Workflow file for this run

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: [ self-hosted, Linux, X64 ]
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:
toolchain: stable
# aws-lc-rs requires nasm: https://github.com/rustls/rustls/issues/1913
- name: Install NASM
if: ${{ startsWith(matrix.platform, 'windows-') }}
uses: ilammy/setup-nasm@v1
- name: Install cargo-llvm-cov
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 rsql_drivers --target ${{ matrix.target }}
- name: Test
if: ${{ matrix.platform != 'linux-x64' && !startsWith(matrix.platform, 'wasm32-') }}
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RUST_BACKTRACE: 1
RUST_LOG: "info"
RUST_LOG_SPAN_EVENTS: full
run: |
cargo test --workspace --features all
- name: Test
if: ${{ matrix.platform == 'linux-x64' }}
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RUST_BACKTRACE: 1
RUST_LOG: "info"
RUST_LOG_SPAN_EVENTS: full
run: |
cargo llvm-cov --workspace --lcov --jobs 2 --output-path lcov.info
- name: Upload to codecov.io
if: ${{ matrix.platform == 'linux-x64' }}
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}