Skip to content

fix: release - 'miss working-dir' #38

fix: release - 'miss working-dir'

fix: release - 'miss working-dir' #38

Workflow file for this run

name: Release
on:
push:
tags:
- v*
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [x86_64-linux, aarch64-linux, x86_64-macos, aarch64-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: Build blst on host
run: |
cd blst
zig cc -fno-builtin -fPIC -target x86_64-linux -c src/server.c -o server.o
zig cc -fno-builtin -fPIC -target x86_64-linux -c build/assembly.S -o assembly.o
zig ar rcs libblst.a server.o assembly.o
- name: Verify built blst on host
run: |
ls -la blst/libblst.a
- name: Build and test blst-z on host
run: |
zig build test
- name: Build blst on ${{ matrix.platform }}
run: |
cd blst
rm -f libblst.a
zig cc -fno-builtin -fPIC -target ${{ matrix.platform }} -c src/server.c -o server.o
zig cc -fno-builtin -fPIC -target ${{ matrix.platform }} -c build/assembly.S -o assembly.o
zig ar rcs libblst.a server.o assembly.o
- name: Verify built blst on ${{ matrix.platform }}
run: |
ls -la blst/libblst.a
- name: Build blst-z on ${{ matrix.platform }}
run: |
zig build -Dtarget=${{ matrix.platform }}
- name: Upload static library artifact for ${{ matrix.platform }}
uses: actions/upload-artifact@v4
with:
name: libblst_${{ matrix.platform }}.a
path: zig-out/lib/libblst.a
compression-level: 0 # No compression
- name: Set shared library extension
id: set_extension
run: |
case "${{ matrix.platform }}" in
x86_64-linux|aarch64-linux) echo "EXT=so" >> $GITHUB_ENV ;;
*) echo "EXT=dylib" >> $GITHUB_ENV ;;
esac
- name: Upload shared library artifact for ${{ matrix.platform }}
uses: actions/upload-artifact@v4
with:
name: libblst_min_pk_${{ matrix.platform }}.${{ env.EXT }}
path: zig-out/lib/libblst_min_pk.${{ env.EXT }}
compression-level: 0 # No compression
create-release:
needs: build-and-test
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: release
- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
working-directory: ${{ github.workspace }}/release
with:
tag_name: ${{ github.ref }}
name: Release ${{ github.ref }}
files: *

Check failure on line 104 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 104
draft: false
prerelease: false