Skip to content

Commit

Permalink
Use env to set CC for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bonomat committed Dec 10, 2020
1 parent cb4b8ed commit ab03901
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,15 @@ jobs:

- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
ci_cc: clang-9

- target: x86_64-apple-darwin
os: macos-latest
ci_cc: gcc

runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.ci_cc }}
steps:
- name: Checkout Crate
uses: actions/checkout@v2
Expand All @@ -113,16 +117,17 @@ jobs:
CARGO_TARGET_DIR=wasm cargo install --verbose --force wasm-pack
printf '\n[lib]\ncrate-type = ["cdylib", "rlib"]\n' >> Cargo.toml
- name: Running wasm tests Ubuntu
- name: Print clang version Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
clang --version
CC=clang-9 wasm-pack build
CC=clang-9 wasm-pack test --node
- name: Running wasm tests MacOS
- name: Print gcc version MacOS
if: matrix.os == 'macos-latest'
run: |
gcc --version
CC=gcc wasm-pack build
CC=gcc wasm-pack test --node
- name: Running wasm tests
run: |
wasm-pack build
wasm-pack test --node

0 comments on commit ab03901

Please sign in to comment.