Merge pull request #42 from SoftVarE-Group/macos-15 #199
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
- push | |
jobs: | |
Check: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Nix | |
uses: DeterminateSystems/nix-installer-action@v16 | |
- name: Cache | |
uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Check | |
run: nix flake check -L | |
Build: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- double: aarch64-linux # target we are building for | |
system: aarch64-linux # system we are building on | |
emulated: true # whether this build is being emulated | |
runner: ubuntu-24.04 # GitHub runner the build is running on | |
interpreter: /lib/ld-linux-aarch64.so.1 # path to libc interpreter | |
- double: x86_64-linux | |
system: x86_64-linux | |
runner: ubuntu-24.04 | |
interpreter: /lib64/ld-linux-x86-64.so.2 | |
- double: x86_64-darwin | |
system: x86_64-darwin | |
runner: macos-13 | |
- double: aarch64-darwin | |
system: aarch64-darwin | |
runner: macos-15 | |
variant: | |
- flake: ddnnife | |
artifact: '' | |
- flake: ddnnife-d4-bundled | |
artifact: '-d4' | |
exclude: | |
- target: { double: x86_64-linux } | |
variant: { flake: ddnnife } | |
- target: { double: aarch64-linux } | |
variant: { flake: ddnnife } | |
include: | |
- target: { double: aarch64-linux, system: aarch64-linux, emulated: true, runner: ubuntu-24.04 } | |
variant: { flake: ddnnife-static, artifact: '' } | |
- target: { double: x86_64-linux, system: x86_64-linux, runner: ubuntu-24.04 } | |
variant: { flake: ddnnife-static, artifact: '' } | |
- target: { double: x86_64-windows, system: x86_64-linux, runner: ubuntu-24.04 } | |
variant: { flake: ddnnife-windows, artifact: '' } | |
- target: { double: x86_64-windows, system: x86_64-linux, runner: ubuntu-24.04 } | |
variant: { flake: ddnnife-windows-d4-bundled, artifact: '-d4' } | |
runs-on: ${{ matrix.target.runner }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: QEMU | |
if: ${{ matrix.target.emulated }} | |
run: sudo apt-get install -y qemu-user-static | |
- name: Nix | |
uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
extra-conf: extra-platforms = ${{ matrix.target.system }} | |
- name: Cache | |
uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Build | |
run: nix build -L .#packages.${{ matrix.target.system }}.${{ matrix.variant.flake }} | |
- name: Set interpreter | |
if: ${{ matrix.target.interpreter }} | |
run: | | |
cp -rL result output | |
rm -rf result | |
chmod +w output/bin/* | |
nix run nixpkgs#patchelf -- --set-interpreter ${{ matrix.target.interpreter }} output/bin/* | |
chmod -w output/bin/* | |
mv output result | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ddnnife-${{ matrix.target.double }}${{ matrix.variant.artifact }} | |
path: result |