Skip to content

Commit

Permalink
Simplify dotnet-core.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Apr 27, 2024
1 parent 43c9557 commit b316e59
Showing 1 changed file with 28 additions and 94 deletions.
122 changes: 28 additions & 94 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- next

jobs:
build-windows:
build-windows-msvc:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -24,61 +24,50 @@ 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
uses: goto-bus-stop/setup-zig@2a9625d550eefc3a9b1a43d342ad655f563f8241
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
with:
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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit b316e59

Please sign in to comment.