From b316e598dfa767987ad0561aca2e64152cfcdea2 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 27 Apr 2024 22:28:53 +0200 Subject: [PATCH] Simplify dotnet-core.yml --- .github/workflows/dotnet-core.yml | 122 +++++++----------------------- 1 file changed, 28 insertions(+), 94 deletions(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 73790cc45c..2b7c3cc1e2 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -7,7 +7,7 @@ on: - next jobs: - build-windows: + build-windows-msvc: runs-on: windows-latest steps: - uses: actions/checkout@v3 @@ -24,7 +24,7 @@ jobs: name: build-win-x86 path: bin/Win32/Release/v143/dynamic/libsodium.dll - build-windows-arm64: + build-others: runs-on: ubuntu-latest steps: - name: Install Zig @@ -32,26 +32,18 @@ jobs: with: version: 0.12.0 - uses: actions/checkout@v3 - - name: build + + - name: build-win-arm64 run: | - zig build -Doptimize=ReleaseFast -Dtarget=aarch64-windows - mv zig-out/bin/sodium_shared.dll zig-out/bin/libsodium.dll + rm -fr zig-out zig-cache; zig build -Doptimize=ReleaseFast -Dtarget=aarch64-windows - uses: actions/upload-artifact@v3 with: - name: build-windows-arm64 - path: zig-out/bin/libsodium.dll + name: build-win-arm64 + path: zig-out/lib/libsodium.dll - build-linux-glibc-x64: - runs-on: ubuntu-latest - steps: - - name: Install Zig - uses: goto-bus-stop/setup-zig@2a9625d550eefc3a9b1a43d342ad655f563f8241 - with: - version: 0.12.0 - - uses: actions/checkout@v3 - - name: build + - name: build-linux-x64 run: | - zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-gnu.2.17 + rm -fr zig-out zig-cache; zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-gnu.2.17 - name: tests run: cd zig-out/bin && ./run.sh - uses: actions/upload-artifact@v3 @@ -59,26 +51,23 @@ jobs: name: build-linux-x64 path: zig-out/lib/libsodium.so - build-linux-glibc-arm: - runs-on: ubuntu-latest - steps: - - name: Install Zig - uses: goto-bus-stop/setup-zig@2a9625d550eefc3a9b1a43d342ad655f563f8241 - with: - version: 0.12.0 - - name: Set up emulation environment + - name: Set up arm and aarch64 emulation environment run: | export DEBIAN_FRONTEND=noninteractive sudo apt-get update - sudo apt-get install -y build-essential qemu binfmt-support qemu-user-static qemu-system-arm gcc-arm-linux-gnueabihf libc6-armhf-cross + sudo apt-get install -y build-essential qemu binfmt-support qemu-user-static qemu-system-arm gcc-arm-linux-gnueabihf libc6-armhf-cross gcc-aarch64-linux-gnu libc6-arm64-cross sudo dpkg --add-architecture armhf sudo update-binfmts --enable qemu-arm sudo update-binfmts --display sudo ln -s /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.* /lib - - uses: actions/checkout@v3 - - name: build + sudo dpkg --add-architecture arm64 + sudo update-binfmts --enable qemu-aarch64 + sudo update-binfmts --display + sudo ln -s /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.* /lib + + - name: build-linux-arm run: | - zig build -Doptimize=ReleaseFast -Dtarget=arm-linux-gnueabihf.2.23 + rm -fr zig-out zig-cache; zig build -Doptimize=ReleaseFast -Dtarget=arm-linux-gnueabihf.2.23 - name: tests run: | cd zig-out/bin && env LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib ./run.sh @@ -87,26 +76,9 @@ jobs: name: build-linux-arm path: zig-out/lib/libsodium.so - build-linux-glibc-arm64: - runs-on: ubuntu-latest - steps: - - name: Install Zig - uses: goto-bus-stop/setup-zig@2a9625d550eefc3a9b1a43d342ad655f563f8241 - with: - version: 0.12.0 - - name: Set up emulation environment - run: | - export DEBIAN_FRONTEND=noninteractive - sudo apt-get update - sudo apt-get install -y qemu binfmt-support qemu-user-static qemu-system-arm gcc-aarch64-linux-gnu libc6-arm64-cross - sudo dpkg --add-architecture arm64 - sudo update-binfmts --enable qemu-aarch64 - sudo update-binfmts --display - sudo ln -s /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.* /lib - - uses: actions/checkout@v3 - - name: build + - name: build-linux-arm64 run: | - zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux-gnu.2.23 + rm -fr zig-out zig-cache; zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux-gnu.2.23 - name: tests run: | cd zig-out/bin && env LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib ./run.sh @@ -115,58 +87,25 @@ jobs: name: build-linux-arm64 path: zig-out/lib/libsodium.so - build-linux-musl-x64: - runs-on: ubuntu-latest - container: - image: alpine:3.13 - steps: - - name: Set up build environment - run: | - apk update - apk add alpine-sdk ca-certificates xz - - name: Install Zig - uses: goto-bus-stop/setup-zig@2a9625d550eefc3a9b1a43d342ad655f563f8241 - with: - version: 0.12.0 - - uses: actions/checkout@v3 - - name: build - run: | - zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-musl - - name: tests + - name: build-linux-musl-x64 run: | - cd zig-out/bin && ./run.sh + rm -fr zig-out zig-cache; zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-musl - uses: actions/upload-artifact@v3 with: name: build-linux-musl-x64 path: zig-out/lib/libsodium.a - build-linux-musl-arm: - runs-on: ubuntu-latest - steps: - - name: Install Zig - uses: goto-bus-stop/setup-zig@2a9625d550eefc3a9b1a43d342ad655f563f8241 - with: - version: 0.12.0 - - uses: actions/checkout@v3 - - name: build + - name: build-linux-musl-arm run: | - zig build -Doptimize=ReleaseFast -Dtarget=arm-linux-musleabihf + rm -fr zig-out zig-cache; zig build -Doptimize=ReleaseFast -Dtarget=arm-linux-musleabihf - uses: actions/upload-artifact@v3 with: name: build-linux-musl-arm path: zig-out/lib/libsodium.a - build-linux-musl-arm64: - runs-on: ubuntu-latest - steps: - - name: Install Zig - uses: goto-bus-stop/setup-zig@2a9625d550eefc3a9b1a43d342ad655f563f8241 - with: - version: 0.12.0 - - uses: actions/checkout@v3 - - name: build + - name: build-linux-musl-arm64 run: | - zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux-musl + rm -fr zig-out zig-cache; zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux-musl - uses: actions/upload-artifact@v3 with: name: build-linux-musl-arm64 @@ -207,13 +146,8 @@ jobs: pack: runs-on: ubuntu-latest needs: - - build-windows - - build-linux-glibc-x64 - - build-linux-glibc-arm - - build-linux-glibc-arm64 - - build-linux-musl-x64 - - build-linux-musl-arm - - build-linux-musl-arm64 + - build-windows-msvc + - build-others - build-macos-x64 - build-macos-arm64 container: