Skip to content

Commit

Permalink
Mimic test CI in release
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Sep 1, 2023
1 parent 075184a commit 465075b
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,34 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

upload-assets:
name: Build ${{ matrix.job.target }}
runs-on: ${{ matrix.job.os }}
strategy:
fail-fast: false
matrix:
include:
# Targets that match the OS of the runner.
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04

# Targets using cross-compilation (upload-rust-binary-action
# detects that they need cross).
- target: x86_64-unknown-linux-musl
os: ubuntu-20.04
runs-on: ${{ matrix.os }}
job:
- { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04 }
- { target: x86_64-apple-darwin, os: macos-latest }
- { target: x86_64-pc-windows-gnu, os: windows-latest }
- { target: x86_64-unknown-linux-musl, os: ubuntu-20.04, use-cross: true }
- { target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, use-cross: true }
- { target: aarch64-apple-darwin, os: macos-latest, use-cross: true }

steps:
- uses: actions/checkout@v3
- name: Check out code
uses: actions/checkout@v3

- name: Install Rust toolchain
uses: dtolnay/[email protected]
with:
targets: ${{ matrix.job.target }}

- name: Install cross
if: matrix.job.use-cross
uses: taiki-e/install-action@v2
with:
tool: cross

- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: difft
Expand Down

0 comments on commit 465075b

Please sign in to comment.