This repository was archived by the owner on Sep 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 1.84 KB
/
rust.yml
File metadata and controls
71 lines (60 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
permissions:
contents: write
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: macos-latest
rust_target: x86_64-apple-darwin
ext: ''
args: ''
- os: macos-latest
rust_target: aarch64-apple-darwin
ext: ''
args: ''
- os: windows-latest
rust_target: x86_64-pc-windows-msvc
ext: ''
args: ''
- os: windows-latest
rust_target: aarch64-pc-windows-msvc
ext: ''
args: ''
steps:
- uses: actions/checkout@v3
- name: Add target
id: add-target
run: |
rustup target add ${{matrix.config.rust_target}}
echo "commitHash=${GITHUB_SHA:0:9}" >> $GITHUB_OUTPUT
- name: Add bundle tool
run: |
cargo install cargo-bundle
- name: Build
run: cargo bundle --release --target ${{matrix.config.rust_target}}
- uses: actions/upload-artifact@v4.3.1
name: Upload Windows Artifact
if: ${{ matrix.config.os == 'windows-latest' }}
with:
path: target/${{matrix.config.rust_target}}/release/bundle//CAIE-Code-Installer.exe
retention-days: 7
name: cci-${{matrix.config.rust_target}}-${{steps.add-target.outputs.commitHash}}
- uses: actions/upload-artifact@v4.3.1
name: Upload macOS Artifact
if: ${{ matrix.config.os == 'macos-latest' }}
with:
path: target/${{matrix.config.rust_target}}/release/bundle/osx/CAIE-Code-Installer.app
retention-days: 7
name: cci-${{matrix.config.rust_target}}-${{steps.add-target.outputs.commitHash}}