@@ -26,28 +26,44 @@ jobs:
26
26
target : x86_64-apple-darwin
27
27
- os : macos-latest-xlarge
28
28
target : aarch64-apple-darwin
29
+
29
30
runs-on : ${{ matrix.os }}
30
31
steps :
31
32
- name : Check out repository
32
33
uses : actions/checkout@v4
33
34
with :
34
35
fetch-depth : 16
35
36
36
- - name : Setup dependencies
37
+ - name : Setup dependencies (x86_64-linux)
37
38
if : matrix.os == 'ubuntu-latest'
38
- run : sudo apt update && sudo apt install -y ninja-build
39
+ run : |
40
+ sudo apt update && \
41
+ sudo apt install -y ninja-build && \
42
+ touch .env
43
+
44
+ - name : Setup dependencies (x86_64-apple)
45
+ if : startsWith(matrix.target, 'x86_64-apple')
46
+ run : |
47
+ brew install ninja llvm lld &&
48
+ echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> .env &&
49
+ echo 'export LDFLAGS="-L/usr/local/opt/llvm/lib"' >> .env &&
50
+ echo 'export CPPFLAGS="-I/usr/local/opt/llvm/include"' >> .env
39
51
40
- - name : Setup dependencies
41
- if : startsWith(matrix.os , 'macos ')
52
+ - name : Setup dependencies (aarch64-apple)
53
+ if : startsWith(matrix.target , 'aarch64-apple ')
42
54
run : |
43
- brew install ninja gettext &&
44
- brew link --force gettext
55
+ brew install ninja llvm lld &&
56
+ echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> .env &&
57
+ echo 'export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"' >> .env &&
58
+ echo 'export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"' >> .env
59
+
45
60
- name : Generate configuration
46
61
run : |
47
62
HOST=${{ matrix.target }} envsubst < config.template.toml > config.toml &&
48
63
cat config.toml
64
+
49
65
- name : Run build
50
- run : ./x.py dist
66
+ run : source .env && ./x.py dist
51
67
52
68
- name : Set artifact name
53
69
id : artifact-name
0 commit comments