fix: use zig cc in release.yml #3
Workflow file for this run
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: Zig Build and Test | |
on: | |
push: | |
branches: | |
- te/publish_built_files | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: [x86_64-macos] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive # Ensures submodules are cloned | |
fetch-depth: 0 # Fetches the entire history for all branches | |
- name: Verify Submodules | |
run: | | |
git submodule update --init --recursive | |
ls -la blst | |
- name: Install Zig | |
uses: mlugg/setup-zig@v1 | |
with: | |
version: "0.13.0" # Set the required Zig version | |
- name: Run blst/build.sh | |
run: | | |
cd blst | |
zig cc -target ${{ matrix.platform }} -c src/server.c -o server.o | |
zig cc -target ${{ matrix.platform }} -c build/assembly.S -o assembly.o | |
zig ar rcs libblst.a server.o assembly.o | |
- name: Verify built blst | |
run: | | |
ls -la blst/libblst.a | |
- name: Build binary | |
run: | | |
zig build -Dtarget=${{ matrix.platform }} test | |
- name: Upload artifacts for testing | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-output-${{ matrix.platform }} | |
path: zig-out/lib/* |