-
-
Notifications
You must be signed in to change notification settings - Fork 73
71 lines (63 loc) · 1.79 KB
/
release.yml
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: release
on:
push:
branches:
- main
- release/*
env:
RUSTFLAGS: -Dwarnings
jobs:
artifacts:
name: Artifacts
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: "ubuntu-latest"
dir: linux-x86_64
artifacts: "mun libmun_runtime.so"
RUSTFLAGS: "-Dwarnings"
- os: "windows-latest"
dir: windows-x86_64
artifacts: "mun.exe mun_runtime.dll mun_runtime.dll.lib"
RUSTFLAGS: "-Dwarnings -Ctarget-feature=+crt-static"
- os: "macOS-latest"
dir: macos-x86_64
artifacts: "mun libmun_runtime.dylib"
RUSTFLAGS: "-Dwarnings"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
- name: Install LLVM
uses: ./.github/actions/install-llvm
- name: Cargo build
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: ${{ matrix.config.RUSTFLAGS }}
with:
command: build
args: --release
- run: mkdir -p ${{ matrix.config.dir }}
- name: Move artifacts
env:
ARTIFACTS: ${{ matrix.config.artifacts }}
OUT_DIR: ${{ matrix.config.dir }}
run: |
import os
artifacts = os.environ['ARTIFACTS'].split()
for artifact in artifacts:
src = "target/release/%s" % artifact
dst = os.environ['OUT_DIR'] + "/" + artifact
os.rename(src, dst)
shell: python
- uses: actions/upload-artifact@master
with:
name: ${{ matrix.config.dir }}
path: ${{ matrix.config.dir }}