Skip to content

Fix string comparison #5

Fix string comparison

Fix string comparison #5

Workflow file for this run

name: Build Rust project
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
defaults:
run:
shell: bash
jobs:
build:
strategy:
fail-fast: false
matrix:
cargo_profile: [ "debug", "release" ]
os: [ "windows-latest", "ubuntu-latest" ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
with:
submodules: true
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Print tool versions
run: |
rustup --version
cargo --version
rustc --version
# NOTE: stupid workaround for cargo erroring on "--debug".
- name: Set Cargo extra args
if: ${{ matrix.cargo_profile == 'release' }}
run: echo "CARGO_EXTRA_ARGS=--release" >> $GITHUB_ENV
- name: Run Cargo build
run: |
cargo build \
--verbose \
--features cxx/c++20 \
--features cxx/std \
${{ env.CARGO_EXTRA_ARGS }}
- name: Archive build artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: rust-cxx-${{ matrix.os }}-${{ matrix.cargo_profile }}
path: target/