Skip to content

Merge pull request #14 from RelationalAI/ag-put-stream-and-modules #4

Merge pull request #14 from RelationalAI/ag-put-stream-and-modules

Merge pull request #14 from RelationalAI/ag-put-stream-and-modules #4

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- env:
GH_TOKEN: ${{ github.token }}
run: gh release create ${{ github.ref_name }}
assets:
needs: release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# The targets should match the platforms on the package's Yggdrasil build recipe:
# https://github.com/JuliaPackaging/Yggdrasil/blob/e8a9f04d70652738c682407b9799ada044d24614/O/object_store_ffi/build_tarballs.jl#L20
# 64-bit (x86)
- build: linux-64-bit
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
prebuild: "true"
command: cross
- build: macos-64-bit
os: macos-latest
target: x86_64-apple-darwin
prebuild: "true"
command: cargo
# 64-bit (ARM)
- build: linux-arm
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
prebuild: "true"
command: cross
- build: macos-arm
os: macos-latest
target: aarch64-apple-darwin
prebuild: "true"
command: cargo
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.target }}
- run: cargo install cross --git https://github.com/cross-rs/cross
- run: ${{ matrix.prebuild }}
- run: ${{ matrix.command }} build --release --target ${{ matrix.target }}
# 7z is available on all runners.
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#preinstalled-software
- name: Create archive
id: archive
shell: bash
run: |
DIRECTORY="object_store_ffi-${{ github.ref_name }}-${{ matrix.build }}"
mkdir "$DIRECTORY"
cp README.md "$DIRECTORY"
if [[ "${{ matrix.build }}" =~ "macos" ]]; then
cp "target/${{ matrix.target }}/release/libobject_store_ffi.dylib" "$DIRECTORY"
else
cp "target/${{ matrix.target }}/release/libobject_store_ffi.so" "$DIRECTORY"
fi
7z a "$DIRECTORY.zip" "$DIRECTORY"
echo "path=$DIRECTORY.zip" >> $GITHUB_OUTPUT
- env:
GH_TOKEN: ${{ github.token }}
run: gh release upload ${{ github.ref_name }} ${{ steps.archive.outputs.path }}