Skip to content

Commit 79f79b8

Browse files
Update linux CI
1 parent 139fcb8 commit 79f79b8

File tree

3 files changed

+115
-13
lines changed

3 files changed

+115
-13
lines changed

.github/workflows/buildArtifacts.yml

Lines changed: 72 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ env:
1111
ninja-version: '1.11.1'
1212
clang-version: '18.1.8'
1313
sha-length: 7
14+
apt-source: 'echo -e "Types: deb\nURIs: http://archive.ubuntu.com/ubuntu/\nSuites: jammy\nComponents: main restricted universe multiverse\nArchitectures: amd64 i386" | sudo tee /etc/apt/sources.list.d/jammy.sources'
15+
linux-requirements: 'sudo apt install libasound2-dev libfreetype-dev libcurl4-openssl-dev libwebkit2gtk-4.0-dev libgtk-3-dev'
1416

1517
jobs:
1618
prepare-package:
@@ -19,7 +21,7 @@ jobs:
1921
strategy:
2022
fail-fast: false
2123
matrix:
22-
os: [windows-latest]
24+
os: [windows-latest, ubuntu-latest]
2325
compiler: [MSVC, Clang]
2426
include:
2527
- os: windows-latest
@@ -28,6 +30,13 @@ jobs:
2830
- os: windows-latest
2931
compiler: Clang
3032
vcpkg_triplet: x64-windows-llvm
33+
- os: ubuntu-latest
34+
compiler: Clang
35+
vcpkg_triplet: x64-linux-llvm
36+
37+
exclude:
38+
- os: ubuntu-latest
39+
compiler: MSVC
3140

3241
steps:
3342
- name: Checkout
@@ -47,6 +56,12 @@ jobs:
4756
shell: cmd
4857
run: .\bootstrap-vcpkg.bat
4958

59+
- name: Install vcpkg Linux
60+
if: runner.os == 'Linux'
61+
working-directory: ${{github.workspace}}/vcpkg
62+
shell: bash
63+
run: bash ./bootstrap-vcpkg.sh
64+
5065
- name: Initialize MSVC Environment
5166
if: matrix.compiler == 'MSVC'
5267
uses: ilammy/msvc-dev-cmd@v1
@@ -60,6 +75,21 @@ jobs:
6075
version: ${{env.clang-version}}
6176
directory: ${{runner.temp}}/llvm
6277

78+
- name: Set Linux APT Source
79+
if: runner.os == 'Linux'
80+
shell: bash
81+
run: ${{env.apt-source}}
82+
83+
- name: Update Linux APT Source
84+
if: runner.os == 'Linux'
85+
shell: bash
86+
run: 'sudo apt update'
87+
88+
- name: Install Linux Requirements
89+
if: runner.os == 'Linux'
90+
shell: bash
91+
run: ${{env.linux-requirements}}
92+
6393
- name: Export GitHub Actions Cache Environment Variables
6494
uses: actions/github-script@v7
6595
with:
@@ -72,7 +102,7 @@ jobs:
72102
shell: pwsh
73103
env:
74104
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
75-
run: vcpkg install --x-manifest-root=../scripts/vcpkg-manifest --x-install-root=./installed --triplet=${{matrix.vcpkg_triplet}}
105+
run: ./vcpkg install --x-manifest-root=../scripts/vcpkg-manifest --x-install-root=./installed --triplet=${{matrix.vcpkg_triplet}}
76106

77107
- name: Get Short SHA
78108
if: ${{!cancelled()}}
@@ -98,7 +128,7 @@ jobs:
98128
strategy:
99129
fail-fast: false
100130
matrix:
101-
os: [windows-latest]
131+
os: [windows-latest, ubuntu-latest]
102132
build_type: [Debug, Release]
103133
compiler: [MSVC, Clang]
104134
include:
@@ -108,6 +138,9 @@ jobs:
108138
- os: windows-latest
109139
compiler: Clang
110140
vcpkg_triplet: x64-windows-llvm
141+
- os: ubuntu-latest
142+
compiler: Clang
143+
vcpkg_triplet: x64-linux-llvm
111144

112145
- os: windows-latest
113146
build_type: Debug
@@ -129,6 +162,20 @@ jobs:
129162
compiler: Clang
130163
cmake_config: 'Ninja Release Win64 LLVM'
131164
build_path: 'ninja-release-win64-llvm'
165+
- os: ubuntu-latest
166+
build_type: Debug
167+
compiler: Clang
168+
cmake_config: 'Ninja Debug Linux LLVM'
169+
build_path: 'ninja-debug-linux-llvm'
170+
- os: ubuntu-latest
171+
build_type: Release
172+
compiler: Clang
173+
cmake_config: 'Ninja Release Linux LLVM'
174+
build_path: 'ninja-release-linux-llvm'
175+
176+
exclude:
177+
- os: ubuntu-latest
178+
compiler: MSVC
132179

133180
permissions:
134181
id-token: write
@@ -153,6 +200,12 @@ jobs:
153200
shell: cmd
154201
run: .\bootstrap-vcpkg.bat
155202

203+
- name: Install vcpkg Linux
204+
if: runner.os == 'Linux'
205+
working-directory: ${{github.workspace}}/vcpkg
206+
shell: bash
207+
run: bash ./bootstrap-vcpkg.sh
208+
156209
- name: Initialize MSVC Environment
157210
if: matrix.compiler == 'MSVC'
158211
uses: ilammy/msvc-dev-cmd@v1
@@ -166,6 +219,21 @@ jobs:
166219
version: ${{env.clang-version}}
167220
directory: ${{runner.temp}}/llvm
168221

222+
- name: Set Linux APT Source
223+
if: runner.os == 'Linux'
224+
shell: bash
225+
run: ${{env.apt-source}}
226+
227+
- name: Update Linux APT Source
228+
if: runner.os == 'Linux'
229+
shell: bash
230+
run: 'sudo apt update'
231+
232+
- name: Install Linux Requirements
233+
if: runner.os == 'Linux'
234+
shell: bash
235+
run: ${{env.linux-requirements}}
236+
169237
- name: Export GitHub Actions Cache Environment Variables
170238
uses: actions/github-script@v7
171239
with:
@@ -178,7 +246,7 @@ jobs:
178246
shell: pwsh
179247
env:
180248
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
181-
run: vcpkg install --x-manifest-root=../scripts/vcpkg-manifest --x-install-root=./installed --triplet=${{matrix.vcpkg_triplet}}
249+
run: ./vcpkg install --x-manifest-root=../scripts/vcpkg-manifest --x-install-root=./installed --triplet=${{matrix.vcpkg_triplet}}
182250

183251
- name: Configure CMake
184252
working-directory: ${{github.workspace}}

scripts/ci/findBinary-unix.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
# Check if a directory is provided as an argument
4+
if [ -z "$1" ]; then
5+
echo "Usage: $0 <directory>"
6+
exit 1
7+
fi
8+
9+
# Directory to search
10+
directory=$1
11+
12+
# Find ELF, Mach-O and Universal Binary files in the specified directory
13+
files=$(find "$directory" -type f -exec sh -c 'file -b "$1" | grep -qE "ELF|Mach-O|universal binary" && echo "$1" | sed "s:/\{1,\}:/:g"' _ {} \;)
14+
15+
# Initialize an empty string for the output
16+
output=""
17+
18+
# Loop through each file and format it
19+
for file in $files; do
20+
if [ -z "$output" ]; then
21+
output="\"$file\""
22+
else
23+
output="$output,\"$file\""
24+
fi
25+
done
26+
27+
# Print the formatted output
28+
echo $output

scripts/ci/findBinary.ps1

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@ if (-not (Test-Path -Path $DirectoryPath)) {
77
exit
88
}
99

10-
# Get all .exe .dll and .vst3 files recursively from the specified directory
11-
$files = Get-ChildItem -Path $DirectoryPath -Recurse -Include *.exe, *.dll, *.vst3
10+
if ($IsWindows) {
11+
# Get all .exe .dll and .vst3 files recursively from the specified directory
12+
$files = Get-ChildItem -Path $DirectoryPath -Recurse -Include *.exe, *.dll, *.vst3
13+
14+
# Format the output
15+
$output = $files | ForEach-Object {
16+
'"' + $_.FullName + '"'
17+
}
1218

13-
# Format the output
14-
$output = $files | ForEach-Object {
15-
'"' + $_.FullName + '"'
16-
}
17-
18-
# Join the file names with a comma separator
19-
$joinedOutput = $output -join ","
19+
# Join the file names with a comma separator
20+
$joinedOutput = $output -join ","
21+
}
22+
else {
23+
# Get all ELF Mach-O and universal binary files recursively from the specified directory
24+
$joinedOutput = & ./findBinary-unix.sh $DirectoryPath
25+
}
2026

2127
# Print the output
2228
Write-Output $joinedOutput

0 commit comments

Comments
 (0)