From feaa76eb5906f745bfd9b77664c8aa17d04fb8a5 Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Fri, 16 Jun 2023 04:07:14 +0100 Subject: [PATCH] ci: provide build job The code in this crate uses lots of conditional compilation for cross-platform capability. Therefore, it's important before release that we make sure the code can build properly on both the Windows and Unix OS families. --- .github/workflows/pr.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f045adf..9bce520 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,6 +12,30 @@ env: RUSTFLAGS: "-D warnings" jobs: + # The code in this crate uses lots of conditional compilation for cross-platform capabilities. + # Therefore, it's important we make sure it can build on both the Windows and Unix OS families. + build: + name: build + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: windows-latest + target: x86_64-pc-windows-msvc + - os: macos-latest + target: x86_64-apple-darwin + - os: ubuntu-latest + target: x86_64-unknown-linux-musl + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + id: toolchain + with: + profile: minimal + toolchain: stable + override: true + - shell: bash + run: cargo build --all-targets --all-features checks: if: "!startsWith(github.event.pull_request.title, 'Automated version bump')" name: Clippy & fmt