This repository has been archived by the owner on Jul 8, 2024. It is now read-only.
Change header extension from .h to .hpp #852
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: Build Rust | |
on: [pull_request, push] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- artifact-name: Rust Native - Windows x86_64 (Sleipnir) | |
optimizer_backend: sleipnir | |
os: windows-2022 | |
cmake-env: | |
cargo-build-flags: | |
- artifact-name: Rust Native - Windows aarch64 (Sleipnir) | |
optimizer_backend: sleipnir | |
os: windows-2022 | |
cmake-env: | |
cargo-build-flags: --target aarch64-pc-windows-msvc | |
- artifact-name: Rust Native - macOS universal (Sleipnir) | |
optimizer_backend: sleipnir | |
os: macOS-14 | |
cmake_env: | |
cargo-build-flags: | |
- artifact-name: Rust Native - Linux x86_64 (Sleipnir) | |
optimizer_backend: sleipnir | |
os: ubuntu-24.04 | |
cmake-env: | |
cargo-build-flags: | |
- artifact-name: Rust Native - Linux aarch64 (Sleipnir) | |
optimizer_backend: sleipnir | |
os: ubuntu-24.04 | |
cmake-env: | |
cargo-build-flags: --target aarch64-unknown-linux-gnu | |
name: "${{ matrix.artifact-name }}" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Windows aarch64 Rust compiler | |
if: matrix.artifact-name == 'Rust Native - Windows aarch64 (Sleipnir)' | |
run: rustup target install aarch64-pc-windows-msvc | |
- name: Set up Linux aarch64 Rust compiler | |
if: matrix.artifact-name == 'Rust Native - Linux aarch64 (Sleipnir)' | |
run: | | |
sudo apt-get update -q | |
sudo apt-get install -y g++-14-aarch64-linux-gnu | |
sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-14 200 | |
sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-14 200 | |
rustup target install aarch64-unknown-linux-gnu | |
- name: Make GCC 14 the default toolchain (Linux) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 200 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 200 | |
- run: sudo xcode-select -switch /Applications/Xcode_15.3.app | |
if: startsWith(matrix.os, 'macOS') | |
- run: ${{matrix.cmake-env }} cargo build ${{ matrix.cargo-build-flags }} --features ${{ matrix.optimizer_backend }} | |
- run: cargo run --example swerve --features ${{ matrix.optimizer_backend }} | |
if: matrix.artifact-name != 'Rust Native - Windows aarch64 (Sleipnir)' && | |
matrix.artifact-name != 'Rust Native - Linux aarch64 (Sleipnir)' |