Skip to content

Commit

Permalink
Try splitting workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
morrisonlevi committed May 27, 2022
1 parent 698c5ef commit 54162ad
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ name: Test
on: [push]
env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.56.1

jobs:
test:
name: "cargo test --workspace #${{ matrix.platform }} ${{ matrix.rust_version }}"
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [windows-latest, ubuntu-latest, macos-latest]
platform: [windows-latest, ubuntu-latest, macos-latest]
rust_version: [""]
include:
- platform: "ubuntu-latest"
rust_version: "1.56.1"
rust_version: "${RUST_VERSION}"
steps:
- name: Checkout sources
uses: actions/checkout@v2
Expand All @@ -34,3 +35,30 @@ jobs:
run: bash ffi-build.sh /tmp/libddprof
- name: "Test building C bindings"
run: mkdir examples/ffi/build && cd examples/ffi/build && cmake -S .. -DDDProf_ROOT=/tmp/libddprof && cmake --build .

ffi:
name: "FFI #${{ matrix.platform }} ${{ matrix.rust_version }}"
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [windows-latest, ubuntu-latest, macos-latest]
rust_version: [""]
include:
- platform: "ubuntu-latest"
rust_version: "${RUST_VERSION}"
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cache
uses: ./.github/actions/cache
with:
rust_version: ${{ matrix.rust_version }}
- name: Install Rust ${{ matrix.rust_version }}
if: ${{ matrix.rust_version != '' }}
run: rustup install ${{ matrix.rust_version }} && rustup default ${{ matrix.rust_version }}
- id: rust-version
run: "echo ::set-output name=version::$(rustc --version)"
- name: "Generate FFI"
run: bash ffi-build.sh /tmp/libddprof
- name: "Test building C bindings"
run: mkdir examples/ffi/build && cd examples/ffi/build && cmake -S .. -DDDProf_ROOT=/tmp/libddprof && cmake --build .

0 comments on commit 54162ad

Please sign in to comment.