Skip to content

Commit fe41e72

Browse files
authored
GitHub Workflow: (#2106)
- Switched from windows-2019 to windows-2022 - Switched to ubuntu-24.04-arm image for Linux aarch64 jobs - Fixed Linux x86 job. It was failing but not reported - Switched from Visual Studio 16 2019 generators to Visual Studio 17 2022 - Uncommented Windows MINGW32 static and shared jobs - Generic clean-up
1 parent d03c092 commit fe41e72

File tree

3 files changed

+139
-154
lines changed

3 files changed

+139
-154
lines changed

.github/workflows/Crate-publishing.yml

+45-45
Original file line numberDiff line numberDiff line change
@@ -26,58 +26,58 @@ jobs:
2626
matrix:
2727
config:
2828
- {
29-
os: windows-2019,
30-
arch: x64,
31-
name: 'Windows x86_64'
32-
}
29+
os: windows-2022,
30+
arch: x64,
31+
name: 'Windows x86_64'
32+
}
3333
- {
34-
os: windows-2019,
35-
arch: x86,
36-
name: 'Windows x86'
37-
}
34+
os: windows-2022,
35+
arch: x86,
36+
name: 'Windows x86'
37+
}
3838
- {
39-
os: ubuntu-latest,
40-
arch: x64,
41-
name: 'Ubuntu x86_64'
42-
}
39+
os: ubuntu-latest,
40+
arch: x64,
41+
name: 'Ubuntu x86_64'
42+
}
4343
- {
44-
os: macos-latest,
45-
arch: x64,
46-
name: 'macOS x86_64'
47-
}
44+
os: macos-latest,
45+
arch: x64,
46+
name: 'macOS x86_64'
47+
}
4848
steps:
49-
- uses: actions/checkout@v4
49+
- uses: actions/checkout@v4
5050

51-
- name: '🛠️ Set up Rust'
52-
uses: dtolnay/rust-toolchain@stable
51+
- name: '🛠️ Set up Rust'
52+
uses: dtolnay/rust-toolchain@stable
5353

54-
- name: '🛠️ Activate Developer Command Prompt'
55-
if: contains(matrix.config.os, 'win')
56-
uses: ilammy/msvc-dev-cmd@v1
57-
with:
58-
arch: ${{ matrix.config.arch }}
54+
- name: '🛠️ Activate Developer Command Prompt'
55+
if: contains(matrix.config.os, 'win')
56+
uses: ilammy/msvc-dev-cmd@v1
57+
with:
58+
arch: ${{ matrix.config.arch }}
5959

60-
- name: '🛠️ Win build dependencies'
61-
if: contains(matrix.config.os, 'win')
62-
shell: bash
63-
run: |
64-
choco install ninja
60+
- name: '🛠️ Win build dependencies'
61+
if: contains(matrix.config.os, 'win')
62+
shell: bash
63+
run: |
64+
choco install ninja
6565
66-
- name: '🛠️ macOS build dependencies'
67-
if: contains(matrix.config.os, 'macOS')
68-
shell: bash
69-
run: |
70-
brew install ninja
66+
- name: '🛠️ macOS build dependencies'
67+
if: contains(matrix.config.os, 'macOS')
68+
shell: bash
69+
run: |
70+
brew install ninja
7171
72-
- name: '🚧 Cargo test'
73-
if: "!startsWith(github.ref, 'refs/tags')"
74-
run: |
75-
cargo test
72+
- name: '🚧 Cargo test'
73+
if: "!startsWith(github.ref, 'refs/tags')"
74+
run: |
75+
cargo test
7676
77-
- name: '📦 Cargo Publish'
78-
if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') && contains(matrix.config.os, 'ubuntu')
79-
env:
80-
TOKEN: ${{ secrets.cratesio_token }}
81-
UNICORN_VERSION: dev
82-
run: |
83-
cargo login $TOKEN && cargo test && cargo publish
77+
- name: '📦 Cargo Publish'
78+
if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') && contains(matrix.config.os, 'ubuntu')
79+
env:
80+
TOKEN: ${{ secrets.cratesio_token }}
81+
UNICORN_VERSION: dev
82+
run: |
83+
cargo login $TOKEN && cargo test && cargo publish

.github/workflows/Nuget-publishing.yml

+31-12
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
matrix:
3636
config:
3737
- {
38-
os: windows-2019,
38+
os: windows-2022,
3939
arch: x64,
4040
python-arch: x64,
4141
python-ver: '3.8',
@@ -45,10 +45,10 @@ jobs:
4545
shared: 'yes',
4646
build_type: 'Release',
4747
archiver: '7z a',
48-
generators: 'Visual Studio 16 2019'
48+
generators: 'Visual Studio 17 2022'
4949
}
5050
- {
51-
os: windows-2019,
51+
os: windows-2022,
5252
arch: x86,
5353
python-arch: x86,
5454
python-ver: '3.8',
@@ -58,7 +58,7 @@ jobs:
5858
shared: 'yes',
5959
build_type: 'Release',
6060
archiver: '7z a',
61-
generators: 'Visual Studio 16 2019'
61+
generators: 'Visual Studio 17 2022'
6262
}
6363
compiler: [ gcc ]
6464
steps:
@@ -228,7 +228,7 @@ jobs:
228228
generators: 'Ninja'
229229
}
230230
- {
231-
os: ubuntu-22.04,
231+
os: ubuntu-24.04-arm,
232232
arch: aarch64,
233233
python-arch: aarch64,
234234
python-ver: '3.8',
@@ -237,7 +237,7 @@ jobs:
237237
build_type: 'Release',
238238
archiver: '7z a',
239239
generators: 'Ninja',
240-
distro: ubuntu20.04
240+
distro: ubuntu24.04
241241
}
242242
- {
243243
os: ubuntu-22.04,
@@ -249,22 +249,23 @@ jobs:
249249
build_type: 'Release',
250250
archiver: '7z a',
251251
generators: 'Ninja',
252-
distro: ubuntu20.04
252+
distro: ubuntu22.04
253253
}
254254
compiler: [ gcc ]
255255
steps:
256256
- uses: actions/checkout@v4
257257

258258
- name: '🚧 Linux x64/x86 build'
259259
if: contains(matrix.config.arch, 'x64') || contains(matrix.config.arch, 'x86')
260-
shell: 'script -q -e -c "bash {0}"'
260+
shell: bash
261261
run: |
262262
if [ ${{ matrix.config.arch }} == 'x64' ]; then
263+
sudo apt update -q -y
263264
sudo apt install -q -y libcmocka-dev ninja-build
264265
else
265266
export CFLAGS="-m32" LDFLAGS="-m32" LDFLAGS_STATIC="-m32" UNICORN_QEMU_FLAGS="--cpu=i386"
266267
sudo dpkg --add-architecture i386
267-
sudo apt update
268+
sudo apt update -q -y
268269
sudo apt install -q -y lib32ncurses-dev lib32z1-dev lib32gcc-9-dev libc6-dev-i386 gcc-multilib \
269270
libcmocka-dev:i386 libcmocka0:i386 libc6:i386 libgcc-s1:i386 ninja-build
270271
fi
@@ -281,8 +282,26 @@ jobs:
281282
cmake --install . --strip
282283
ctest -VV -C ${{ matrix.config.build_type }}
283284
284-
- name: '🚧 Linux ppc64le/aarch64 build'
285-
if: contains(matrix.config.arch, 'ppc64le') || contains(matrix.config.arch, 'aarch64')
285+
- name: '🚧 Linux aarch64 build'
286+
if: contains(matrix.config.arch, 'aarch64')
287+
shell: bash
288+
run: |
289+
sudo apt-get update -q -y
290+
sudo apt-get install -q -y git cmake build-essential automake libcmocka-dev pkg-config ${{ matrix.compiler }} ninja-build
291+
mkdir build
292+
mkdir instdir
293+
cmake \
294+
-S . \
295+
-B . \
296+
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
297+
-G "${{ matrix.config.generators }}" \
298+
-DCMAKE_INSTALL_PREFIX:PATH=/instdir
299+
cmake --build . --config ${{ matrix.config.build_type }}
300+
sudo cmake --install . --strip
301+
ctest -VV -C ${{ matrix.config.build_type }}
302+
303+
- name: '🚧 Linux ppc64le build'
304+
if: contains(matrix.config.arch, 'ppc64le')
286305
uses: uraimo/run-on-arch-action@v2
287306
with:
288307
arch: ${{ matrix.config.arch }}
@@ -323,7 +342,7 @@ jobs:
323342
name: ${{ matrix.config.artifact }}
324343

325344
publish:
326-
needs: ["Windows", "Macos", "Linux"]
345+
needs: [ "Windows", "Macos", "Linux" ]
327346
if: ${{ needs.Windows.result == 'success' && needs.Macos.result == 'success' && needs.Linux.result == 'success' }}
328347
runs-on: ubuntu-latest
329348

0 commit comments

Comments
 (0)