Skip to content

Commit

Permalink
Run builds on ci for mac and windows (#1009)
Browse files Browse the repository at this point in the history
### What
Run builds on ci for mac and windows

### Why
To ensure that developers on these other platforms can build and test
contracts.
  • Loading branch information
leighmcculloch authored Jun 24, 2023
1 parent 63940e1 commit 5fa3750
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
env:
RUSTFLAGS: -D warnings

defaults:
run:
shell: bash

jobs:

complete:
Expand Down Expand Up @@ -51,24 +55,38 @@ jobs:

build-and-test:
strategy:
fail-fast: false
matrix:
sys:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
# TODO: Figure out why builds are broken for linux arm64 and reenable.
# https://github.com/stellar/rs-soroban-sdk/issues/1011
# - os: ubuntu-latest
# target: aarch64-unknown-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.sys.os }}
steps:
- uses: actions/checkout@v3
- uses: stellar/actions/rust-cache@main
- run: rustup update
- run: rustup target add ${{ matrix.sys.target }}
- run: rustup target add wasm32-unknown-unknown
- if: matrix.target == 'aarch64-unknown-linux-gnu'
run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- uses: stellar/binaries@v12
with:
name: cargo-hack
version: 0.5.16
- run: cargo hack build --target wasm32-unknown-unknown --profile release
- run: cargo hack --feature-powerset --exclude-features docs build --target ${{ matrix.sys.target }}
- run: cargo hack --feature-powerset --ignore-unknown-features --features testutils --exclude-features docs test --target ${{ matrix.sys.target }}
- run: cargo-hack hack build --target wasm32-unknown-unknown --profile release
- run: cargo-hack hack --feature-powerset --exclude-features docs build --target ${{ matrix.sys.target }}
- if: startsWith(matrix.sys.target, 'x86_64')
run: cargo-hack hack --feature-powerset --ignore-unknown-features --features testutils --exclude-features docs test --target ${{ matrix.sys.target }}

build-fuzz:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5fa3750

Please sign in to comment.