Skip to content

Commit

Permalink
add macos & windows jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Shayne Fletcher committed Jan 12, 2024
1 parent ff28220 commit 3335066
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .github/actions/cargo_build_and_test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Cargo build and test
description: Use Cargo to build and test Reindeer
runs:
using: composite
steps:
- run: cargo build --locked
shell: bash
- run: cargo test
shell: bash
3 changes: 1 addition & 2 deletions .github/actions/setup_linux_env/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Setup Linux environment
description: |
Setup Linux environment for building and testing Reindeer.
description: Setup Linux environment for building and testing Reindeer
runs:
using: composite
steps:
Expand Down
16 changes: 16 additions & 0 deletions .github/actions/setup_macos_env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Setup macOS environment
description: Setup macOS environment for building and testing Reindeer
runs:
using: composite
steps:
- uses: SebRollen/[email protected]
id: read_rust_toolchain
with:
file: rust-toolchain
field: toolchain.channel
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ steps.read_rust_toolchain.outputs.value }}
- uses: Swatinem/rust-cache@v2
with:
prefix-key: reindeer-upload
16 changes: 16 additions & 0 deletions .github/actions/setup_windows_env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Setup Windows environment
description: Setup Windows environment for building and testing Reindeer
runs:
using: composite
steps:
- uses: SebRollen/[email protected]
id: read_rust_toolchain
with:
file: rust-toolchain
field: toolchain.channel
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ steps.read_rust_toolchain.outputs.value }}
- uses: Swatinem/rust-cache@v2
with:
prefix-key: reindeer-upload
15 changes: 13 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,16 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_linux_env
- run: cargo build --locked
- run: cargo test
- uses: ./.github/actions/cargo_build_and_test
macos-build-and-test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_macos_env
- uses: ./.github/actions/cargo_build_and_test
windows-build-and-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_windows_env
- uses: ./.github/actions/cargo_build_and_test

0 comments on commit 3335066

Please sign in to comment.