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
This commit is contained in:
@Antelox
2025-02-15 11:23:10 +01:00
committed by GitHub
parent d03c0922e6
commit fe41e72b96
3 changed files with 140 additions and 155 deletions

View File

@@ -26,58 +26,58 @@ jobs:
matrix: matrix:
config: config:
- { - {
os: windows-2019, os: windows-2022,
arch: x64, arch: x64,
name: 'Windows x86_64' name: 'Windows x86_64'
} }
- { - {
os: windows-2019, os: windows-2022,
arch: x86, arch: x86,
name: 'Windows x86' name: 'Windows x86'
} }
- { - {
os: ubuntu-latest, os: ubuntu-latest,
arch: x64, arch: x64,
name: 'Ubuntu x86_64' name: 'Ubuntu x86_64'
} }
- { - {
os: macos-latest, os: macos-latest,
arch: x64, arch: x64,
name: 'macOS x86_64' name: 'macOS x86_64'
} }
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: '🛠️ Set up Rust' - name: '🛠️ Set up Rust'
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
- name: '🛠️ Activate Developer Command Prompt' - name: '🛠️ Activate Developer Command Prompt'
if: contains(matrix.config.os, 'win') if: contains(matrix.config.os, 'win')
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
with: with:
arch: ${{ matrix.config.arch }} arch: ${{ matrix.config.arch }}
- name: '🛠️ Win build dependencies' - name: '🛠️ Win build dependencies'
if: contains(matrix.config.os, 'win') if: contains(matrix.config.os, 'win')
shell: bash shell: bash
run: | run: |
choco install ninja choco install ninja
- name: '🛠️ macOS build dependencies' - name: '🛠️ macOS build dependencies'
if: contains(matrix.config.os, 'macOS') if: contains(matrix.config.os, 'macOS')
shell: bash shell: bash
run: | run: |
brew install ninja brew install ninja
- name: '🚧 Cargo test' - name: '🚧 Cargo test'
if: "!startsWith(github.ref, 'refs/tags')" if: "!startsWith(github.ref, 'refs/tags')"
run: | run: |
cargo test cargo test
- name: '📦 Cargo Publish' - name: '📦 Cargo Publish'
if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') && contains(matrix.config.os, 'ubuntu') if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') && contains(matrix.config.os, 'ubuntu')
env: env:
TOKEN: ${{ secrets.cratesio_token }} TOKEN: ${{ secrets.cratesio_token }}
UNICORN_VERSION: dev UNICORN_VERSION: dev
run: | run: |
cargo login $TOKEN && cargo test && cargo publish cargo login $TOKEN && cargo test && cargo publish

View File

@@ -35,7 +35,7 @@ jobs:
matrix: matrix:
config: config:
- { - {
os: windows-2019, os: windows-2022,
arch: x64, arch: x64,
python-arch: x64, python-arch: x64,
python-ver: '3.8', python-ver: '3.8',
@@ -45,10 +45,10 @@ jobs:
shared: 'yes', shared: 'yes',
build_type: 'Release', build_type: 'Release',
archiver: '7z a', archiver: '7z a',
generators: 'Visual Studio 16 2019' generators: 'Visual Studio 17 2022'
} }
- { - {
os: windows-2019, os: windows-2022,
arch: x86, arch: x86,
python-arch: x86, python-arch: x86,
python-ver: '3.8', python-ver: '3.8',
@@ -58,7 +58,7 @@ jobs:
shared: 'yes', shared: 'yes',
build_type: 'Release', build_type: 'Release',
archiver: '7z a', archiver: '7z a',
generators: 'Visual Studio 16 2019' generators: 'Visual Studio 17 2022'
} }
compiler: [ gcc ] compiler: [ gcc ]
steps: steps:
@@ -228,7 +228,7 @@ jobs:
generators: 'Ninja' generators: 'Ninja'
} }
- { - {
os: ubuntu-22.04, os: ubuntu-24.04-arm,
arch: aarch64, arch: aarch64,
python-arch: aarch64, python-arch: aarch64,
python-ver: '3.8', python-ver: '3.8',
@@ -237,7 +237,7 @@ jobs:
build_type: 'Release', build_type: 'Release',
archiver: '7z a', archiver: '7z a',
generators: 'Ninja', generators: 'Ninja',
distro: ubuntu20.04 distro: ubuntu24.04
} }
- { - {
os: ubuntu-22.04, os: ubuntu-22.04,
@@ -249,7 +249,7 @@ jobs:
build_type: 'Release', build_type: 'Release',
archiver: '7z a', archiver: '7z a',
generators: 'Ninja', generators: 'Ninja',
distro: ubuntu20.04 distro: ubuntu22.04
} }
compiler: [ gcc ] compiler: [ gcc ]
steps: steps:
@@ -257,14 +257,15 @@ jobs:
- name: '🚧 Linux x64/x86 build' - name: '🚧 Linux x64/x86 build'
if: contains(matrix.config.arch, 'x64') || contains(matrix.config.arch, 'x86') if: contains(matrix.config.arch, 'x64') || contains(matrix.config.arch, 'x86')
shell: 'script -q -e -c "bash {0}"' shell: bash
run: | run: |
if [ ${{ matrix.config.arch }} == 'x64' ]; then if [ ${{ matrix.config.arch }} == 'x64' ]; then
sudo apt update -q -y
sudo apt install -q -y libcmocka-dev ninja-build sudo apt install -q -y libcmocka-dev ninja-build
else else
export CFLAGS="-m32" LDFLAGS="-m32" LDFLAGS_STATIC="-m32" UNICORN_QEMU_FLAGS="--cpu=i386" export CFLAGS="-m32" LDFLAGS="-m32" LDFLAGS_STATIC="-m32" UNICORN_QEMU_FLAGS="--cpu=i386"
sudo dpkg --add-architecture i386 sudo dpkg --add-architecture i386
sudo apt update sudo apt update -q -y
sudo apt install -q -y lib32ncurses-dev lib32z1-dev lib32gcc-9-dev libc6-dev-i386 gcc-multilib \ sudo apt install -q -y lib32ncurses-dev lib32z1-dev lib32gcc-9-dev libc6-dev-i386 gcc-multilib \
libcmocka-dev:i386 libcmocka0:i386 libc6:i386 libgcc-s1:i386 ninja-build libcmocka-dev:i386 libcmocka0:i386 libc6:i386 libgcc-s1:i386 ninja-build
fi fi
@@ -281,8 +282,26 @@ jobs:
cmake --install . --strip cmake --install . --strip
ctest -VV -C ${{ matrix.config.build_type }} ctest -VV -C ${{ matrix.config.build_type }}
- name: '🚧 Linux ppc64le/aarch64 build' - name: '🚧 Linux aarch64 build'
if: contains(matrix.config.arch, 'ppc64le') || contains(matrix.config.arch, 'aarch64') if: contains(matrix.config.arch, 'aarch64')
shell: bash
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y git cmake build-essential automake libcmocka-dev pkg-config ${{ matrix.compiler }} ninja-build
mkdir build
mkdir instdir
cmake \
-S . \
-B . \
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
-G "${{ matrix.config.generators }}" \
-DCMAKE_INSTALL_PREFIX:PATH=/instdir
cmake --build . --config ${{ matrix.config.build_type }}
sudo cmake --install . --strip
ctest -VV -C ${{ matrix.config.build_type }}
- name: '🚧 Linux ppc64le build'
if: contains(matrix.config.arch, 'ppc64le')
uses: uraimo/run-on-arch-action@v2 uses: uraimo/run-on-arch-action@v2
with: with:
arch: ${{ matrix.config.arch }} arch: ${{ matrix.config.arch }}
@@ -323,7 +342,7 @@ jobs:
name: ${{ matrix.config.artifact }} name: ${{ matrix.config.artifact }}
publish: publish:
needs: ["Windows", "Macos", "Linux"] needs: [ "Windows", "Macos", "Linux" ]
if: ${{ needs.Windows.result == 'success' && needs.Macos.result == 'success' && needs.Linux.result == 'success' }} if: ${{ needs.Windows.result == 'success' && needs.Macos.result == 'success' && needs.Linux.result == 'success' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -37,104 +37,88 @@ jobs:
matrix: matrix:
config: config:
- { - {
os: windows-2019, os: windows-2022,
arch: x64, arch: x64,
python-arch: x64,
python-ver: '3.8',
name: 'windows-x64 MINGW64 shared', name: 'windows-x64 MINGW64 shared',
shared: 'yes', shared: 'yes',
mingw: MINGW64, mingw: MINGW64,
mingw-arch: x86_64, mingw-arch: x86_64,
artifact: 'windows_mingw64-shared.7z', artifact: 'windows-mingw64-shared.7z',
archiver: '7z a', archiver: '7z a',
generators: 'Ninja' generators: 'Ninja'
} }
- { - {
os: windows-2019, os: windows-2022,
arch: x64, arch: x64,
python-arch: x64,
python-ver: '3.8',
name: 'windows-x64 MINGW64 static', name: 'windows-x64 MINGW64 static',
shared: 'no', shared: 'no',
mingw: MINGW64, mingw: MINGW64,
mingw-arch: x86_64, mingw-arch: x86_64,
artifact: 'windows_mingw64-static.7z', artifact: 'windows-mingw64-static.7z',
archiver: '7z a', archiver: '7z a',
generators: 'Ninja' generators: 'Ninja'
} }
# - { # This fails randomly which can't be reproduced. - { # This fails randomly which can't be reproduced.
# os: windows-2019, os: windows-2022,
# arch: x64, arch: x64,
# python-arch: x64, name: 'windows-x64 MINGW32 shared',
# python-ver: '3.8', shared: "yes",
# name: 'windows-x64 MINGW32 shared', mingw: MINGW32,
# shared: "yes", mingw-arch: i686,
# mingw: MINGW32, artifact: 'windows-mingw32-shared.7z',
# mingw-arch: i686, archiver: '7z a',
# artifact: 'windows_mingw32.7z', generators: 'Ninja'
# archiver: '7z a', }
# generators: 'Ninja' - { # This fails randomly which can't be reproduced.
# } os: windows-2022,
# - { # This fails randomly which can't be reproduced. arch: x64,
# os: windows-2019, name: 'windows-x64 MINGW32 static',
# arch: x64, shared: "no",
# python-arch: x64, mingw: MINGW32,
# python-ver: '3.8', mingw-arch: i686,
# name: 'windows-x64 MINGW32 static', artifact: 'windows-mingw32-static.7z',
# shared: "no", archiver: '7z a',
# mingw: MINGW32, generators: 'Ninja'
# mingw-arch: i686, }
# artifact: 'windows_mingw32.7z', - {
# archiver: '7z a', os: windows-2022,
# generators: 'Ninja'
# }
- {
os: windows-2019,
arch: x64, arch: x64,
python-arch: x64,
python-ver: '3.8',
name: 'windows-x64 MSVC 64bit shared', name: 'windows-x64 MSVC 64bit shared',
msvc-arch: x64, msvc-arch: x64,
artifact: 'windows_msvc64_shared.7z', artifact: 'windows-msvc64-shared.7z',
shared: 'yes', shared: 'yes',
archiver: '7z a', archiver: '7z a',
generators: 'Visual Studio 16 2019' generators: 'Visual Studio 17 2022'
} }
- { - {
os: windows-2019, os: windows-2022,
arch: x86, arch: x86,
python-arch: x86,
python-ver: '3.8',
name: 'windows-x86 MSVC 32bit shared', name: 'windows-x86 MSVC 32bit shared',
msvc-arch: x86, msvc-arch: x86,
artifact: 'windows_msvc32_shared.7z', artifact: 'windows-msvc32-shared.7z',
shared: 'yes', shared: 'yes',
archiver: '7z a', archiver: '7z a',
generators: 'Visual Studio 16 2019' generators: 'Visual Studio 17 2022'
} }
- { - {
os: windows-2019, os: windows-2022,
arch: x64, arch: x64,
python-arch: x64,
python-ver: '3.8',
name: 'windows-x64 MSVC 64bit static', name: 'windows-x64 MSVC 64bit static',
msvc-arch: x64, msvc-arch: x64,
artifact: 'windows_msvc64_static.7z', artifact: 'windows-msvc64-static.7z',
shared: 'no', shared: 'no',
archiver: '7z a', archiver: '7z a',
generators: 'Visual Studio 16 2019' generators: 'Visual Studio 17 2022'
} }
- { - {
os: windows-2019, os: windows-2022,
arch: x86, arch: x86,
python-arch: x86,
python-ver: '3.8',
name: 'windows-x86 MSVC 32bit static', name: 'windows-x86 MSVC 32bit static',
msvc-arch: x86, msvc-arch: x86,
artifact: 'windows_msvc32_static.7z', artifact: 'windows-msvc32-static.7z',
shared: 'no', shared: 'no',
archiver: '7z a', archiver: '7z a',
generators: 'Visual Studio 16 2019' generators: 'Visual Studio 17 2022'
} }
compiler: [ gcc ] compiler: [ gcc ]
steps: steps:
@@ -263,8 +247,6 @@ jobs:
- { - {
os: macos-13, # x64 os: macos-13, # x64
arch: x64, arch: x64,
python-arch: x64,
python-ver: '3.8',
name: 'macos-x64 cmake shared', name: 'macos-x64 cmake shared',
shared: 'yes', shared: 'yes',
artifact: 'macos-x64-cmake-shared-x64.7z', artifact: 'macos-x64-cmake-shared-x64.7z',
@@ -274,8 +256,6 @@ jobs:
- { - {
os: macos-13, os: macos-13,
arch: x64, arch: x64,
python-arch: x64,
python-ver: '3.8',
name: 'macos-x64 cmake static', name: 'macos-x64 cmake static',
shared: 'no', shared: 'no',
artifact: 'macos-x64-cmake-static-x64.7z', artifact: 'macos-x64-cmake-static-x64.7z',
@@ -285,8 +265,6 @@ jobs:
- { - {
os: macos-14, # arm64 os: macos-14, # arm64
arch: arm64, arch: arm64,
python-arch: arm64,
python-ver: '3.8',
name: 'macos-arm64 cmake shared', name: 'macos-arm64 cmake shared',
shared: 'yes', shared: 'yes',
artifact: 'macos-arm64-cmake-shared-x64.7z', artifact: 'macos-arm64-cmake-shared-x64.7z',
@@ -296,8 +274,6 @@ jobs:
- { - {
os: macos-14, os: macos-14,
arch: arm64, arch: arm64,
python-arch: arm64,
python-ver: '3.8',
name: 'macos-arm64 cmake static', name: 'macos-arm64 cmake static',
shared: 'no', shared: 'no',
artifact: 'macos-arm64-cmake-static-x64.7z', artifact: 'macos-arm64-cmake-static-x64.7z',
@@ -307,8 +283,6 @@ jobs:
- { - {
os: macos-13, os: macos-13,
arch: x86_64, arch: x86_64,
python-arch: x86_64,
python-ver: '3.8',
name: 'android cmake', name: 'android cmake',
artifact: 'Android-x86_64.7z', artifact: 'Android-x86_64.7z',
archiver: '7za a', archiver: '7za a',
@@ -317,12 +291,6 @@ jobs:
compiler: [ gcc ] compiler: [ gcc ]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
# - name: '🛠️ Python setup'
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.config.python-ver }}
- name: '🚧 Mac build' - name: '🚧 Mac build'
if: contains(matrix.config.name, 'macos') if: contains(matrix.config.name, 'macos')
shell: bash shell: bash
@@ -342,10 +310,6 @@ jobs:
cmake --build . --config ${{ env.BUILD_TYPE }} cmake --build . --config ${{ env.BUILD_TYPE }}
cmake --install . --strip cmake --install . --strip
ctest -VV -C ${{ env.BUILD_TYPE }} ctest -VV -C ${{ env.BUILD_TYPE }}
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
- name: '🚧 Android x86_64 build' - name: '🚧 Android x86_64 build'
if: contains(matrix.config.name, 'android') if: contains(matrix.config.name, 'android')
@@ -429,8 +393,6 @@ jobs:
- { - {
os: ubuntu-latest, os: ubuntu-latest,
arch: x64, arch: x64,
python-arch: x64,
python-ver: '3.8',
name: 'ubuntu-x64 cmake shared', name: 'ubuntu-x64 cmake shared',
shared: 'yes', shared: 'yes',
artifact: 'ubuntu-cmake-shared-x64.7z', artifact: 'ubuntu-cmake-shared-x64.7z',
@@ -440,8 +402,6 @@ jobs:
- { - {
os: ubuntu-latest, os: ubuntu-latest,
arch: x86, arch: x86,
python-arch: x86,
python-ver: '3.8',
name: 'ubuntu-x86 cmake shared', name: 'ubuntu-x86 cmake shared',
shared: 'yes', shared: 'yes',
artifact: 'ubuntu-cmake-shared-x86.7z', artifact: 'ubuntu-cmake-shared-x86.7z',
@@ -451,8 +411,6 @@ jobs:
- { - {
os: ubuntu-latest, os: ubuntu-latest,
arch: x64, arch: x64,
python-arch: x64,
python-ver: '3.8',
name: 'ubuntu-x64 cmake static', name: 'ubuntu-x64 cmake static',
shared: 'no', shared: 'no',
artifact: 'ubuntu-cmake-static-x64.7z', artifact: 'ubuntu-cmake-static-x64.7z',
@@ -462,8 +420,6 @@ jobs:
- { - {
os: ubuntu-latest, os: ubuntu-latest,
arch: x86, arch: x86,
python-arch: x86,
python-ver: '3.8',
name: 'ubuntu-x86 cmake static', name: 'ubuntu-x86 cmake static',
shared: 'no', shared: 'no',
artifact: 'ubuntu-cmake-static-x86.7z', artifact: 'ubuntu-cmake-static-x86.7z',
@@ -471,21 +427,17 @@ jobs:
generators: 'Ninja' generators: 'Ninja'
} }
- { - {
os: ubuntu-22.04, os: ubuntu-24.04-arm,
arch: aarch64, arch: aarch64,
python-arch: aarch64,
python-ver: '3.8',
name: 'ubuntu-aarch64 cmake', name: 'ubuntu-aarch64 cmake',
artifact: 'ubuntu-cmake-aarch64.7z', artifact: 'ubuntu-cmake-aarch64.7z',
archiver: '7z a', archiver: '7z a',
generators: 'Ninja', generators: 'Ninja',
distro: ubuntu22.04 distro: ubuntu24.04
} }
- { - {
os: ubuntu-22.04, os: ubuntu-22.04,
arch: ppc64le, arch: ppc64le,
python-arch: ppc,
python-ver: '3.8',
name: 'ubuntu-ppc64le cmake', name: 'ubuntu-ppc64le cmake',
artifact: 'ubuntu-cmake-ppc64le.7z', artifact: 'ubuntu-cmake-ppc64le.7z',
archiver: '7z a', archiver: '7z a',
@@ -495,21 +447,17 @@ jobs:
compiler: [ gcc ] compiler: [ gcc ]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
# - name: '🛠️ Python setup'
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.config.python-ver }}
- name: '🚧 Linux x64/x86 build' - name: '🚧 Linux x64/x86 build'
if: contains(matrix.config.arch, 'x64') || contains(matrix.config.arch, 'x86') if: contains(matrix.config.arch, 'x64') || contains(matrix.config.arch, 'x86')
shell: 'script -q -e -c "bash {0}"' shell: bash
run: | run: |
if [ ${{ matrix.config.arch }} == 'x64' ]; then if [ ${{ matrix.config.arch }} == 'x64' ]; then
sudo apt-get update -q -y
sudo apt install -q -y libcmocka-dev ninja-build sudo apt install -q -y libcmocka-dev ninja-build
else else
export CFLAGS="-m32" LDFLAGS="-m32" LDFLAGS_STATIC="-m32" UNICORN_QEMU_FLAGS="--cpu=i386" export CFLAGS="-m32" LDFLAGS="-m32" LDFLAGS_STATIC="-m32" UNICORN_QEMU_FLAGS="--cpu=i386"
sudo dpkg --add-architecture i386 sudo dpkg --add-architecture i386
sudo apt-get update -q -y
sudo apt install -q -y lib32ncurses-dev lib32z1-dev lib32gcc-9-dev libc6-dev-i386 gcc-multilib \ sudo apt install -q -y lib32ncurses-dev lib32z1-dev lib32gcc-9-dev libc6-dev-i386 gcc-multilib \
libcmocka-dev:i386 libcmocka0:i386 libc6:i386 libgcc-s1:i386 ninja-build libcmocka-dev:i386 libcmocka0:i386 libc6:i386 libgcc-s1:i386 ninja-build
fi fi
@@ -526,8 +474,26 @@ jobs:
cmake --install . --strip cmake --install . --strip
ctest -VV -C ${{ env.BUILD_TYPE }} ctest -VV -C ${{ env.BUILD_TYPE }}
- name: '🚧 Linux ppc64le/aarch64 build' - name: '🚧 Linux aarch64 build'
if: contains(matrix.config.arch, 'ppc64le') || contains(matrix.config.arch, 'aarch64') if: contains(matrix.config.arch, 'aarch64')
shell: bash
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y git cmake build-essential automake libcmocka-dev pkg-config ${{ matrix.compiler }} ninja-build
mkdir build
mkdir instdir
cmake \
-S . \
-B . \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-G "${{ matrix.config.generators }}" \
-DCMAKE_INSTALL_PREFIX:PATH=/instdir
cmake --build . --config ${{ env.BUILD_TYPE }}
sudo cmake --install . --strip
ctest -VV -C ${{ env.BUILD_TYPE }}
- name: '🚧 Linux ppc64le build'
if: contains(matrix.config.arch, 'ppc64le')
uses: uraimo/run-on-arch-action@v2 uses: uraimo/run-on-arch-action@v2
with: with:
arch: ${{ matrix.config.arch }} arch: ${{ matrix.config.arch }}