Skip to content

Commit

Permalink
Fix Rust build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pemistahl committed Nov 14, 2023
1 parent 7ba3f08 commit 3a7dc16
Showing 1 changed file with 7 additions and 28 deletions.
35 changes: 7 additions & 28 deletions .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,39 +48,17 @@ jobs:
include:
- os: ubuntu-latest
name: Linux Binary 64-Bit
target: x86_64-unknown-linux-musl

- os: macos-latest
name: MacOS Binary 64-Bit
target: x86_64-apple-darwin
env:
MACOSX_DEPLOYMENT_TARGET: 10.7

- os: windows-latest
name: Windows Binary 64-Bit
target: x86_64-pc-windows-msvc

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Add rustup target
run: rustup target add ${{ matrix.target }}

- name: Install apt packages
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get install musl-tools libssl-dev
sudo ln -s /usr/bin/g++ /usr/bin/musl-g++
# needed to fix file corruption of cache
# https://github.com/actions/cache/issues/403
- name: Install GNU tar
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install gnu-tar
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
- name: Install wasm-pack
if: ${{ matrix.os == 'macos-latest' }}
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
Expand All @@ -100,13 +78,14 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build target in debug mode
run: |
cargo build --target ${{ matrix.target }} --locked
cargo build --target ${{ matrix.target }} --locked --bin accuracy_reports --features accuracy-reports
- name: Build library in debug mode
run: cargo build --locked

- name: Build binary in debug mode
run: cargo build --locked --bin accuracy_reports --features accuracy-reports

- name: Test default target in debug mode
run: cargo test --target ${{ matrix.target }}
- name: Test in debug mode
run: cargo test

- name: Run WASM integration tests on NodeJS
if: ${{ matrix.os == 'macos-latest' }}
Expand Down

0 comments on commit 3a7dc16

Please sign in to comment.