@@ -25,26 +25,27 @@ jobs:
25
25
include :
26
26
- target : x86_64-unknown-linux-gnu
27
27
os : ubuntu-latest
28
- # Use cross to link oldest GLIBC possible.
29
- cross : true
30
-
31
- - target : x86_64-unknown-linux-musl
32
- os : ubuntu-latest
33
- cross : true
34
-
35
- - target : aarch64-unknown-linux-gnu
36
- os : ubuntu-latest
37
- cross : true
38
-
39
- - target : aarch64-unknown-linux-musl
40
- os : ubuntu-latest
41
- cross : true
28
+ system : linux
29
+ #
30
+ # - target: x86_64-unknown-linux-musl
31
+ # os: ubuntu-latest
32
+ # system: linux
33
+ #
34
+ # - target: aarch64-unknown-linux-gnu
35
+ # os: ubuntu-latest
36
+ # system: linux
37
+ #
38
+ # - target: aarch64-unknown-linux-musl
39
+ # os: ubuntu-latest
40
+ # system: linux
42
41
43
42
- target : x86_64-apple-darwin
44
- os : macos-latest
43
+ os : macos-14-large
44
+ system : macos
45
45
46
46
- target : aarch64-apple-darwin
47
47
os : macos-latest
48
+ system : macos
48
49
49
50
steps :
50
51
- name : Checkout with ref
@@ -62,21 +63,36 @@ jobs:
62
63
rustup target add ${{ matrix.target }}
63
64
64
65
- uses : Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
65
- with :
66
- workspaces : starknet-foundry
67
66
68
- - name : Install cross
69
- if : matrix.cross
70
- uses : taiki-e/install-action@cross
67
+ - name : Setup LLVM on MacOS
68
+ if : matrix.system == 'macos'
69
+ run : |
70
+ brew install llvm@19
71
+ brew reinstall zstd
72
+ echo "MLIR_SYS_190_PREFIX=$(brew --prefix llvm@19)" >> $GITHUB_ENV
73
+ echo "LLVM_SYS_191_PREFIX=$(brew --prefix llvm@19)" >> $GITHUB_ENV
74
+ echo "TABLEGEN_190_PREFIX=$(brew --prefix llvm@19)" >> $GITHUB_ENV
75
+ echo "LIBRARY_PATH=/opt/homebrew/lib" >> $GITHUB_ENV
71
76
72
- - name : Enable cross-compilation
73
- if : matrix.cross
74
- shell : bash
77
+ - name : Install cross
78
+ if : matrix.system == 'linux'
75
79
run : |
76
- echo "CARGO= cross" >> $GITHUB_ENV
80
+ cargo install cross --git https://github.com/cross-rs/cross
77
81
78
- - name : Build
79
- run : ${{ env.CARGO }} build --release --locked --target ${{ matrix.target }}
82
+ - name : Build MacOS
83
+ if : matrix.system == 'macos'
84
+ run : |
85
+ export MLIR_SYS_190_PREFIX=${{ env.MLIR_SYS_190_PREFIX }}
86
+ export LLVM_SYS_191_PREFIX=${{ env.LLVM_SYS_191_PREFIX }}
87
+ export TABLEGEN_190_PREFIX=${{ env.TABLEGEN_190_PREFIX }}
88
+ export LIBRARY_PATH=${{ env.LIBRARY_PATH }}
89
+ cargo build --release --locked --target ${{ matrix.target }}
90
+
91
+ - name : Build Linux
92
+ if : matrix.system == 'linux'
93
+ run : |
94
+ # Use cross to link oldest GLIBC possible.
95
+ cross build --release --locked --target ${{ matrix.target }}
80
96
81
97
- name : Package
82
98
shell : bash
0 commit comments