Skip to content

Commit

Permalink
Rewrite matrix to use different OSes
Browse files Browse the repository at this point in the history
Signed-off-by: Ismael González <[email protected]>
  • Loading branch information
ismaelgv committed Nov 6, 2021
1 parent 7eca172 commit 2278435
Showing 1 changed file with 31 additions and 12 deletions.
43 changes: 31 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,40 @@ env:
jobs:
build-artifacts:
name: Build a release artifacts
runs-on: ubuntu-latest
runs-on: ${{ matrix.build.os }}
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
- x86_64-apple-darwin
build:
# Linux
- os: "ubuntu-latest"
target: "x86_64-unknown-linux-gnu"
cross: false
- os: "ubuntu-latest"
target: "x86_64-unknown-linux-gnu"
cross: true
- os: "ubuntu-latest"
target: "aarch64-unknown-linux-gnu"
cross: true
- os: "ubuntu-latest"
target: "armv7-unknown-linux-gnueabihf"
cross: true
# MacOS
- os: "macos-latest"
target: "x86_64-apple-darwin"
cross: false
# Windows
- os: "windows-latest"
target: "x86_64-pc-windows-msvc"
cross: false
- os: "windows-latest"
target: "x86_64-pc-windows-gnu"
cross: false

env:
BUILD_DIR: "build"
TARGET: ${{ matrix.target }}
TARGET: ${{ matrix.build.target }}
USE_CROSS: ${{ matrix.build.cross }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -48,7 +67,7 @@ jobs:
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: true
use-cross: ${{ env.USE_CROSS }}
command: build
args: --target=${{ env.TARGET }} --release --verbose

Expand Down Expand Up @@ -87,7 +106,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: artifacts
path: ${steps.package.outputs.name}
path: ${{ steps.package.outputs.name }}

publish-release:
name: Publish a new release
Expand Down

0 comments on commit 2278435

Please sign in to comment.