-
Notifications
You must be signed in to change notification settings - Fork 44
99 lines (94 loc) · 3.14 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: GitHub Release
permissions:
contents: write
discussions: write
on:
push:
tags:
- "v*.*.*"
jobs:
release-linux:
runs-on: ubuntu-24.04
env:
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/
steps:
- name: Checkout
uses: actions/checkout@v4
- name: free HDD space
run: |
# deleting space
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/lib/android
- name: Setup rust env
uses: dtolnay/[email protected]
- name: Retreive cached dependecies
uses: Swatinem/rust-cache@v2
- name: add llvm deb repository
uses: myci-actions/add-deb-repo@11
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Install LLVM
run: sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19 clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools
- name: Install deps
run: make deps
- name: build release
run: make build
- name: Compress into a tar file
run: cd target/release && tar -cJvf ../cairo-native-x86_64.tar.xz cairo-native-test \
cairo-native-compile cairo-native-dump cairo-native-run libcairo_native_runtime.a && cd ..
- uses: actions/upload-artifact@v4
with:
name: linux-build
path: cairo-native-x86_64.tar.xz
release-macos:
runs-on: macos-14
env:
CARGO_TERM_COLOR: always
LIBRARY_PATH: /opt/homebrew/lib
MLIR_SYS_190_PREFIX: /opt/homebrew/opt/llvm@19
LLVM_SYS_191_PREFIX: /opt/homebrew/opt/llvm@19
TABLEGEN_190_PREFIX: /opt/homebrew/opt/llvm@19
RUST_LOG: cairo_native=debug,cairo_native_test=debug
steps:
- uses: actions/checkout@v4
- name: Rustup toolchain install
uses: dtolnay/[email protected]
with:
components: clippy
- name: Rust `$PATH` workaround.
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install deps
run: make deps
- name: Build release
run: make build
- name: Compress into a tar file
run: cd target/release && tar -cJvf ../cairo-native-aarch64.tar.xz cairo-native-test \
cairo-native-compile cairo-native-dump cairo-native-run libcairo_native_runtime.a && cd ..
- uses: actions/upload-artifact@v4
with:
name: macos-build
path: cairo-native-aarch64.tar.xz
release:
runs-on: ubuntu-24.04
needs: [release-macos, release-linux]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download linux
uses: actions/download-artifact@v4
with:
name: linux-build
- name: Download macos
uses: actions/download-artifact@v4
with:
name: macos-build
- name: Release on GitHub
uses: softprops/action-gh-release@v2
with:
files: |
cairo-native-aarch64.tar.xz
cairo-native-x86_64.tar.xz