Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Workflow: Updating jobs with new runners + fixes for Linux and windows x86 jobs #2106

Merged
merged 1 commit into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 45 additions & 45 deletions .github/workflows/Crate-publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,58 +26,58 @@ jobs:
matrix:
config:
- {
os: windows-2019,
arch: x64,
name: 'Windows x86_64'
}
os: windows-2022,
arch: x64,
name: 'Windows x86_64'
}
- {
os: windows-2019,
arch: x86,
name: 'Windows x86'
}
os: windows-2022,
arch: x86,
name: 'Windows x86'
}
- {
os: ubuntu-latest,
arch: x64,
name: 'Ubuntu x86_64'
}
os: ubuntu-latest,
arch: x64,
name: 'Ubuntu x86_64'
}
- {
os: macos-latest,
arch: x64,
name: 'macOS x86_64'
}
os: macos-latest,
arch: x64,
name: 'macOS x86_64'
}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

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

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

- name: '🛠️ Win build dependencies'
if: contains(matrix.config.os, 'win')
shell: bash
run: |
choco install ninja
- name: '🛠️ Win build dependencies'
if: contains(matrix.config.os, 'win')
shell: bash
run: |
choco install ninja

- name: '🛠️ macOS build dependencies'
if: contains(matrix.config.os, 'macOS')
shell: bash
run: |
brew install ninja
- name: '🛠️ macOS build dependencies'
if: contains(matrix.config.os, 'macOS')
shell: bash
run: |
brew install ninja

- name: '🚧 Cargo test'
if: "!startsWith(github.ref, 'refs/tags')"
run: |
cargo test
- name: '🚧 Cargo test'
if: "!startsWith(github.ref, 'refs/tags')"
run: |
cargo test

- name: '📦 Cargo Publish'
if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') && contains(matrix.config.os, 'ubuntu')
env:
TOKEN: ${{ secrets.cratesio_token }}
UNICORN_VERSION: dev
run: |
cargo login $TOKEN && cargo test && cargo publish
- name: '📦 Cargo Publish'
if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') && contains(matrix.config.os, 'ubuntu')
env:
TOKEN: ${{ secrets.cratesio_token }}
UNICORN_VERSION: dev
run: |
cargo login $TOKEN && cargo test && cargo publish
43 changes: 31 additions & 12 deletions .github/workflows/Nuget-publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
matrix:
config:
- {
os: windows-2019,
os: windows-2022,
arch: x64,
python-arch: x64,
python-ver: '3.8',
Expand All @@ -45,10 +45,10 @@ jobs:
shared: 'yes',
build_type: 'Release',
archiver: '7z a',
generators: 'Visual Studio 16 2019'
generators: 'Visual Studio 17 2022'
}
- {
os: windows-2019,
os: windows-2022,
arch: x86,
python-arch: x86,
python-ver: '3.8',
Expand All @@ -58,7 +58,7 @@ jobs:
shared: 'yes',
build_type: 'Release',
archiver: '7z a',
generators: 'Visual Studio 16 2019'
generators: 'Visual Studio 17 2022'
}
compiler: [ gcc ]
steps:
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
generators: 'Ninja'
}
- {
os: ubuntu-22.04,
os: ubuntu-24.04-arm,
arch: aarch64,
python-arch: aarch64,
python-ver: '3.8',
Expand All @@ -237,7 +237,7 @@ jobs:
build_type: 'Release',
archiver: '7z a',
generators: 'Ninja',
distro: ubuntu20.04
distro: ubuntu24.04
}
- {
os: ubuntu-22.04,
Expand All @@ -249,22 +249,23 @@ jobs:
build_type: 'Release',
archiver: '7z a',
generators: 'Ninja',
distro: ubuntu20.04
distro: ubuntu22.04
}
compiler: [ gcc ]
steps:
- uses: actions/checkout@v4

- name: '🚧 Linux x64/x86 build'
if: contains(matrix.config.arch, 'x64') || contains(matrix.config.arch, 'x86')
shell: 'script -q -e -c "bash {0}"'
shell: bash
run: |
if [ ${{ matrix.config.arch }} == 'x64' ]; then
sudo apt update -q -y
sudo apt install -q -y libcmocka-dev ninja-build
else
export CFLAGS="-m32" LDFLAGS="-m32" LDFLAGS_STATIC="-m32" UNICORN_QEMU_FLAGS="--cpu=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 \
libcmocka-dev:i386 libcmocka0:i386 libc6:i386 libgcc-s1:i386 ninja-build
fi
Expand All @@ -281,8 +282,26 @@ jobs:
cmake --install . --strip
ctest -VV -C ${{ matrix.config.build_type }}

- name: '🚧 Linux ppc64le/aarch64 build'
if: contains(matrix.config.arch, 'ppc64le') || contains(matrix.config.arch, 'aarch64')
- name: '🚧 Linux aarch64 build'
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
with:
arch: ${{ matrix.config.arch }}
Expand Down Expand Up @@ -323,7 +342,7 @@ jobs:
name: ${{ matrix.config.artifact }}

publish:
needs: ["Windows", "Macos", "Linux"]
needs: [ "Windows", "Macos", "Linux" ]
if: ${{ needs.Windows.result == 'success' && needs.Macos.result == 'success' && needs.Linux.result == 'success' }}
runs-on: ubuntu-latest

Expand Down
Loading
Loading