Build CJyafn Shared Object and Extensions #15
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: Build CJyafn Shared Object and Extensions | |
on: | |
push: | |
branches: | |
- stable | |
workflow_dispatch: | |
jobs: | |
build-so: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
ref: stable | |
- name: Build shared object | |
run: | | |
bash ./utils/build-linux-so.sh | |
- name: Artifact update | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-x64 | |
if-no-files-found: error | |
path: target/release/libcjyafn.so | |
retention-days: 1 | |
build-extensions: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
ref: stable | |
- name: Install MUSL toolchain | |
run: | | |
sudo apt-get install -y musl-dev musl-tools | |
ln -s "/usr/bin/g++" "/usr/bin/musl-g++" | |
rustup target add x86_64-unknown-linux-musl | |
- name: Build extensions | |
run: | | |
cd jyafn-ext | |
make export | |
- name: Artifact update | |
uses: actions/upload-artifact@v4 | |
with: | |
name: extensions-linux-x64 | |
if-no-files-found: error | |
path: ~/.jyafn/export/*.so | |
retention-days: 1 | |
build-dylib: | |
runs-on: macos-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
ref: stable | |
- name: Build shared object | |
run: | | |
make cjyafn | |
- name: Artifact update | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-arm64 | |
if-no-files-found: error | |
path: target/release/libcjyafn.dylib | |
retention-days: 1 | |
build-extensions-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
ref: stable | |
- name: Build extensions | |
run: | | |
cd jyafn-ext | |
make export | |
- name: Artifact update | |
uses: actions/upload-artifact@v4 | |
with: | |
name: extensions-macos-arm64 | |
if-no-files-found: error | |
path: ~/.jyafn/export/*.dylib | |
retention-days: 1 | |
release: | |
needs: | |
- build-so | |
- build-extensions | |
- build-dylib | |
- build-extensions-macos | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download files | |
uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
*.so | |
*.dylib | |
tag_name: commit-id=${{ github.sha }} | |
prerelease: false | |
make_latest: true |