chore: add splitted targets
This commit is contained in:
parent
d844d2a5fc
commit
377f0afb2a
2 changed files with 101 additions and 30 deletions
127
.github/workflows/cd.yml
vendored
127
.github/workflows/cd.yml
vendored
|
|
@ -17,43 +17,126 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# macOS
|
||||
- target: x86_64-macos
|
||||
os: macos-latest
|
||||
rust-target: x86_64-apple-darwin
|
||||
cross-packages: ""
|
||||
- target: aarch64-macos
|
||||
os: macos-latest
|
||||
rust-target: aarch64-apple-darwin
|
||||
cross-packages: ""
|
||||
|
||||
# Linux
|
||||
- target: x86_64-linux-gnu
|
||||
os: ubuntu-latest
|
||||
rust-target: x86_64-unknown-linux-gnu
|
||||
cross-packages: ""
|
||||
- target: aarch64-linux-gnu
|
||||
os: ubuntu-latest
|
||||
rust-target: aarch64-unknown-linux-gnu
|
||||
cross-packages: gcc-aarch64-linux-gnu
|
||||
- target: x86-linux-gnu
|
||||
os: ubuntu-latest
|
||||
rust-target: i686-unknown-linux-gnu
|
||||
cross-packages: gcc-i686-linux-gnu
|
||||
- target: arm-linux-gnueabihf
|
||||
os: ubuntu-latest
|
||||
rust-target: armv7-unknown-linux-gnueabihf
|
||||
cross-packages: gcc-arm-linux-gnueabihf
|
||||
- target: loongarch64-linux-gnu
|
||||
os: ubuntu-latest
|
||||
rust-target: loongarch64-unknown-linux-gnu
|
||||
cross-packages: gcc-loongarch64-linux-gnu
|
||||
- target: mips64el-linux-gnuabi64
|
||||
os: ubuntu-latest
|
||||
rust-target: mips64el-unknown-linux-gnuabi64
|
||||
cross-packages: gcc-mips64el-linux-gnuabi64
|
||||
- target: powerpc64-linux-gnu
|
||||
os: ubuntu-latest
|
||||
rust-target: powerpc64le-unknown-linux-gnu
|
||||
cross-packages: gcc-powerpc64-linux-gnu
|
||||
- target: riscv64-linux-gnu
|
||||
os: ubuntu-latest
|
||||
rust-target: riscv64gc-unknown-linux-gnu
|
||||
cross-packages: gcc-riscv64-linux-gnu
|
||||
- target: s390x-linux-gnu
|
||||
os: ubuntu-latest
|
||||
rust-target: s390x-unknown-linux-gnu
|
||||
cross-packages: gcc-s390x-linux-gnu
|
||||
|
||||
# Windows
|
||||
- target: x86_64-windows-gnu
|
||||
os: ubuntu-latest
|
||||
rust-target: x86_64-pc-windows-gnu
|
||||
cross-packages: mingw-w64
|
||||
- target: aarch64-windows-gnu
|
||||
os: ubuntu-latest
|
||||
rust-target: aarch64-pc-windows-gnullvm
|
||||
cross-packages: mingw-w64
|
||||
- target: x86-windows-gnu
|
||||
os: ubuntu-latest
|
||||
rust-target: i686-pc-windows-gnu
|
||||
cross-packages: mingw-w64
|
||||
|
||||
# BSD
|
||||
- target: x86_64-freebsd
|
||||
os: ubuntu-latest
|
||||
rust-target: x86_64-unknown-freebsd
|
||||
cross-packages: ""
|
||||
- target: aarch64-freebsd
|
||||
os: ubuntu-latest
|
||||
rust-target: aarch64-unknown-freebsd
|
||||
cross-packages: ""
|
||||
- target: x86_64-netbsd
|
||||
os: ubuntu-latest
|
||||
rust-target: x86_64-unknown-netbsd
|
||||
cross-packages: ""
|
||||
- target: aarch64-netbsd
|
||||
os: ubuntu-latest
|
||||
rust-target: aarch64-unknown-netbsd
|
||||
cross-packages: ""
|
||||
- target: x86_64-openbsd
|
||||
os: ubuntu-latest
|
||||
rust-target: x86_64-unknown-openbsd
|
||||
cross-packages: ""
|
||||
- target: aarch64-openbsd
|
||||
os: ubuntu-latest
|
||||
rust-target: aarch64-unknown-openbsd
|
||||
cross-packages: ""
|
||||
|
||||
# illumos
|
||||
- target: x86_64-solaris
|
||||
os: ubuntu-latest
|
||||
rust-target: x86_64-pc-solaris
|
||||
cross-packages: ""
|
||||
|
||||
# Additional targets
|
||||
- target: wasm32-freestanding
|
||||
os: ubuntu-latest
|
||||
rust-target: wasm32-unknown-unknown
|
||||
cross-packages: ""
|
||||
- target: wasm32-wasi
|
||||
os: ubuntu-latest
|
||||
rust-target: wasm32-wasip1
|
||||
cross-packages: ""
|
||||
- target: x86_64-linux-musl
|
||||
os: ubuntu-latest
|
||||
rust-target: x86_64-unknown-linux-musl
|
||||
cross-packages: ""
|
||||
- target: aarch64-linux-musl
|
||||
os: ubuntu-latest
|
||||
rust-target: aarch64-unknown-linux-musl
|
||||
|
||||
cross-packages: ""
|
||||
- target: aarch64-linux-android
|
||||
os: ubuntu-latest
|
||||
rust-target: aarch64-linux-android
|
||||
cross-packages: ""
|
||||
- target: aarch64-ios
|
||||
os: macos-latest
|
||||
rust-target: aarch64-apple-ios
|
||||
cross-packages: ""
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
|
@ -67,28 +150,28 @@ jobs:
|
|||
with:
|
||||
targets: ${{ matrix.rust-target }}
|
||||
|
||||
- name: Install cross-compilers (Linux-aarch64)
|
||||
if: contains(matrix.target, 'aarch64-linux')
|
||||
- name: Install cross-compilers
|
||||
if: matrix.cross-packages != ''
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc-aarch64-linux-gnu
|
||||
|
||||
- name: Install cross-compilers (Windows-mingw)
|
||||
if: contains(matrix.target, 'windows-gnu')
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y mingw-w64
|
||||
sudo apt-get install -y ${{ matrix.cross-packages }}
|
||||
|
||||
- name: Build Package
|
||||
run: |
|
||||
cd pkg/temporal
|
||||
cd lib
|
||||
zig build -Dbuild-rust -Dtarget=${{ matrix.target }} -Doptimize=ReleaseSafe
|
||||
|
||||
- name: Package artifact
|
||||
run: |
|
||||
cd lib
|
||||
mkdir -p dist
|
||||
tar -czf "dist/${{ matrix.target }}.tar.gz" -C zig-out/lib .
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lib-${{ matrix.target }}
|
||||
path: pkg/temporal/zig-out/lib/
|
||||
name: ${{ matrix.target }}
|
||||
path: lib/dist/${{ matrix.target }}.tar.gz
|
||||
retention-days: 1
|
||||
|
||||
release:
|
||||
|
|
@ -97,30 +180,18 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: all-libs
|
||||
pattern: lib-*
|
||||
path: dist
|
||||
merge-multiple: true
|
||||
|
||||
- name: Prepare Release Artifact
|
||||
run: |
|
||||
mkdir -p release/lib
|
||||
cp -r all-libs/* release/lib/
|
||||
cd release
|
||||
tar -czf ../libtemporal.tar.gz lib/
|
||||
zip -r ../libtemporal.zip lib/
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
libtemporal.tar.gz
|
||||
libtemporal.zip
|
||||
files: dist/*.tar.gz
|
||||
generate_release_notes: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
.fingerprint = 0xded01f16f20c2a64,
|
||||
.dependencies = .{
|
||||
.temporal_rs = .{
|
||||
.url = "git+https://github.com/boa-dev/temporal?ref=v0.2.3#c003cc92325e19b26f8ee2f85e4a47d98cbcc781",
|
||||
.hash = "N-V-__8AAPLKOQDfJ5TYhiiy_6a_dZqUmo9K4e8Xhjfup3fd",
|
||||
.url = "git+https://github.com/boa-dev/temporal?ref=v0.2.4#a5cebbcce231552bf6ed985d7ea13b0c7b195f02",
|
||||
.hash = "N-V-__8AALjnOQBiCk4NffYgEewZ5v9qlLlDyXO22FIyzNdf",
|
||||
},
|
||||
.prebuilt_libtemporal = .{
|
||||
.url = "https://github.com/nurulhudaapon/temporalz/releases/download/v0.2.3/libtemporal.tar.gz",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue