9
9
strategy :
10
10
matrix :
11
11
target :
12
- - id : ' linux-amd64'
13
- os : ' ubuntu-20.04'
14
- tar_extra_args : ' '
15
- - id : ' linux-aarch64'
16
- os : " ubuntu-latest"
17
- # os: ['self-hosted', 'linux', 'ARM64']
18
- - id : ' linux-riscv64'
19
- os : " ubuntu-latest"
20
- # os: ['self-hosted', 'linux', 'RISCV64']
21
- - id : ' darwin-amd64'
22
- os : ' macos-13'
23
- tar_extra_args : ' '
24
- - id : ' darwin-aarch64'
25
- os : ' macos-latest'
26
- tar_extra_args : ' '
27
- # When unpacking an archive on Windows, the symlinks can't be
28
- # created unless the target path already exists. This causes
29
- # problems when the linked file is ordered after the link
30
- - id : ' windows-amd64'
12
+ # - id: 'linux-amd64'
13
+ # os: 'ubuntu-20.04'
14
+ # tar_extra_args: ''
15
+ # - id: 'linux-aarch64'
16
+ # os: "ubuntu-latest"
17
+ # # os: ['self-hosted', 'linux', 'ARM64']
18
+ # - id: 'linux-riscv64'
19
+ # os: "ubuntu-latest"
20
+ # # os: ['self-hosted', 'linux', 'RISCV64']
21
+ # - id: 'darwin-amd64'
22
+ # os: 'macos-13'
23
+ # tar_extra_args: ''
24
+ # - id: 'darwin-aarch64'
25
+ # os: 'macos-latest'
26
+ # tar_extra_args: ''
27
+ # # When unpacking an archive on Windows, the symlinks can't be
28
+ # # created unless the target path already exists. This causes
29
+ # # problems when the linked file is ordered after the link
30
+ # - id: 'windows-amd64-msvc'
31
+ # os: 'windows-2022'
32
+ # # When unpacking an archive on Windows, the symlinks can't be
33
+ # # created unless the target path already exists. This causes
34
+ # # problems when the linked file is ordered after the link
35
+ # # inside the archive. Dereferencing the files when packing them
36
+ # # adds an additional copy per link, but it reliably works and
37
+ # # the additional size is not too large on Windows.
38
+ # tar_extra_args: '--dereference'
39
+ - id : ' windows-amd64-mingw'
31
40
os : ' windows-2022'
32
41
# When unpacking an archive on Windows, the symlinks can't be
33
42
# created unless the target path already exists. This causes
36
45
# adds an additional copy per link, but it reliably works and
37
46
# the additional size is not too large on Windows.
38
47
tar_extra_args : ' --dereference'
48
+
39
49
llvm_version : ['18.x']
40
50
llvm_repo_url : ['https://github.com/llvm/llvm-project.git']
41
51
fail-fast : true
@@ -77,10 +87,16 @@ jobs:
77
87
# choco install ninja
78
88
- name : Setup MSVC (Windows)
79
89
uses : ilammy/msvc-dev-cmd@v1
80
- if : matrix.target.id == 'windows-amd64'
90
+ if : matrix.target.id == 'windows-amd64-msvc'
91
+
92
+ - name : Set up MinGW (Windows-mingw)
93
+ uses : egor-tensin/setup-mingw@v2
94
+ if : matrix.target.id == 'windows-amd64-mingw'
95
+ with :
96
+ platform : x64
81
97
82
98
- name : Build
83
- if : matrix.target.id != 'windows-amd64' && matrix.target.id != 'linux-aarch64' && matrix.target.id != 'linux-riscv64'
99
+ if : (!startsWith( matrix.target.id, 'windows')) && matrix.target.id != 'linux-aarch64' && matrix.target.id != 'linux-riscv64'
84
100
shell : bash
85
101
run : |
86
102
./build.sh ${{ matrix.llvm_version }} ${{ matrix.llvm_repo_url }}
@@ -98,8 +114,15 @@ jobs:
98
114
./build.sh ${{ matrix.llvm_version }} ${{ matrix.llvm_repo_url }} riscv64
99
115
100
116
101
- - name : Build (Windows)
102
- if : matrix.target.id == 'windows-amd64'
117
+ - name : Build (Windows-msvc)
118
+ if : matrix.target.id == 'windows-amd64-msvc'
119
+ # shell: |
120
+ # powershell -Command "& '{0}'"
121
+ run : |
122
+ ./build.sh ${{ matrix.llvm_version }} ${{ matrix.llvm_repo_url }}
123
+
124
+ - name : Build (Windows-mingw)
125
+ if : matrix.target.id == 'windows-amd64-mingw'
103
126
# shell: |
104
127
# powershell -Command "& '{0}'"
105
128
run : |
@@ -211,12 +234,22 @@ jobs:
211
234
asset_name : llvm-darwin-aarch64.tar.xz
212
235
asset_content_type : application/gzip
213
236
214
- - name : Upload Release Asset Windows
237
+ - name : Upload Release Asset Windows (msvc)
238
+ uses : actions/upload-release-asset@v1
239
+ env :
240
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
241
+ with :
242
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
243
+ asset_path : artifacts/windows-amd64-msvc-${{matrix.llvm_version}}/llvm.tar.xz
244
+ asset_name : llvm-windows-amd64-msvc.tar.xz
245
+ asset_content_type : application/gzip
246
+
247
+ - name : Upload Release Asset Windows (mingw)
215
248
uses : actions/upload-release-asset@v1
216
249
env :
217
250
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
218
251
with :
219
252
upload_url : ${{ steps.create_release.outputs.upload_url }}
220
- asset_path : artifacts/windows-amd64-${{matrix.llvm_version}}/llvm.tar.xz
221
- asset_name : llvm-windows-amd64.tar.xz
253
+ asset_path : artifacts/windows-amd64-mingw- ${{matrix.llvm_version}}/llvm.tar.xz
254
+ asset_name : llvm-windows-amd64-mingw .tar.xz
222
255
asset_content_type : application/gzip
0 commit comments