Skip to content

Fix build on Windows #876

Fix build on Windows

Fix build on Windows #876

Workflow file for this run

name: Continuous Integration Checks
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
platform: ubuntu-latest

Check failure on line 9 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Continuous Integration Checks

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 9, Col: 19): Unexpected value 'ubuntu-latest' .github/workflows/build.yml (Line: 57, Col: 9): 'if' is already defined
toolchain: [
stable,
beta,
1.63.0, # Our MSRV
]
include:
- toolchain: stable
check-fmt: true
build-uniffi: true
platform: ubuntu-latest
- toolchain: stable
platform: macos-latest
- toolchain: stable
platform: windows-latest
- toolchain: 1.63.0
msrv: true
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install Rust ${{ matrix.toolchain }} toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
rustup override set ${{ matrix.toolchain }}
- name: Pin packages to allow for MSRV
if: matrix.msrv
run: |
cargo update -p hashlink --precise "0.8.2" --verbose # hashlink 0.8.3 requires hashbrown 0.14, requiring 1.64.0
- name: Build on Rust ${{ matrix.toolchain }}
run: cargo build --verbose --color always
- name: Build with UniFFI support on Rust ${{ matrix.toolchain }}
if: matrix.build-uniffi
run: cargo build --features uniffi --verbose --color always
- name: Build documentation on Rust ${{ matrix.toolchain }}
run: |
cargo doc --release --verbose --color always
cargo doc --document-private-items --verbose --color always
- name: Check release build on Rust ${{ matrix.toolchain }}
run: cargo check --release --verbose --color always
- name: Check release build with UniFFI support on Rust ${{ matrix.toolchain }}
if: matrix.build-uniffi
run: cargo check --release --features uniffi --verbose --color always
- name: Test on Rust ${{ matrix.toolchain }}
if: "matrix.platform != 'windows-latest'"
run: cargo test
- name: Test with UniFFI support on Rust ${{ matrix.toolchain }}
if: "matrix.platform != 'windows-latest'"
if: matrix.build-uniffi
run: cargo test --features uniffi
- name: Check formatting on Rust ${{ matrix.toolchain }}
if: matrix.check-fmt
run: rustup component add rustfmt && cargo fmt --all -- --check