Skip to content

Commit

Permalink
CI: cache & artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
JerwuQu committed Feb 17, 2024
1 parent 390b70b commit bf374d9
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,34 @@ on:
branches: [ "master" ]
jobs:
release:
name: Release - ${{ matrix.platform.release_for }}
name: Release - ${{ matrix.platform.target }}
strategy:
matrix:
platform:
- release_for: Windows-x86_64
os: windows-latest
- os: windows-latest
target: x86_64-pc-windows-gnu
bin: sanpwo.exe
name: sanpwo-x86_64-pc-windows-gnu.zip
command: build
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
key: ${{ matrix.platform.target }}-${{ matrix.platform.os }}
path: |
~/.cargo
target
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
command: build
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.platform.target }}
path: target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}

0 comments on commit bf374d9

Please sign in to comment.