Skip to content

ci: Bulild and publish binaries for all platforms #4

ci: Bulild and publish binaries for all platforms

ci: Bulild and publish binaries for all platforms #4

Workflow file for this run

name: Build and Release
on:
push:
branches:
- master
paths-ignore:
- '**/*.md'
- LICENSE
pull_request:
jobs:
linux:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.bump.outputs.bumped }}
changed-files: ${{ steps.bump.outputs.changed-files }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: prantlf/bump-version-action@v2
id: bump
with:
no-node: true
- uses: prantlf/shelve-changes-action@v1
- run: make lint build
- uses: prantlf/shelve-output-action@v2
if: ${{ steps.bump.outputs.bumped == 'true' }}
with:
name: litevec
path: target/release/litevec
- run: |
rustup target add aarch64-unknown-linux-gnu
make build LINUX_ARM=1
- uses: prantlf/shelve-output-action@v2
if: ${{ steps.bump.outputs.bumped == 'true' }}
with:
arch: arm64
name: litevec
path: target/aarch64-unknown-linux-gnu/release/litevec
macos:
needs:
- linux
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: prantlf/unshelve-changes-action@v1
if: ${{ needs.linux.outputs.changed == 'true' }}
with:
files: ${{ needs.linux.outputs.changed-files }}
discard-shelf: false
- run: make build
- uses: prantlf/shelve-output-action@v2
if: ${{ steps.bump.outputs.bumped == 'true' }}
with:
name: litevec
path: target/release/litevec
- run: |
rustup target add aarch64-apple-darwin
make build MACOS_ARM=1
- uses: prantlf/shelve-output-action@v2
if: ${{ steps.bump.outputs.bumped == 'true' }}
with:
arch: arm64
name: litevec
path: target/aarch64-apple-darwin/release/litevec
windows:
needs:
- linux
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: prantlf/unshelve-changes-action@v1
if: ${{ needs.linux.outputs.changed == 'true' }}
with:
files: ${{ needs.linux.outputs.changed-files }}
discard-shelf: false
- run: cmd /c make-build.bat
- uses: prantlf/shelve-output-action@v2
if: ${{ steps.bump.outputs.bumped == 'true' }}
with:
name: litevec
path: target/release/litevec
- run: |
rustup target add aarch64-pc-windows-msvc
cmd /c make-build.bat
- uses: prantlf/shelve-output-action@v2
if: ${{ steps.bump.outputs.bumped == 'true' }}
with:
arch: arm64
name: litevec
path: target/aarch64-apple-darwin/release/litevec
docker:
needs:
- linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: prantlf/unshelve-changes-action@v1
if: ${{ needs.linux.outputs.changed == 'true' }}
with:
files: ${{ needs.linux.outputs.changed-files }}
discard-shelf: false
- uses: docker/build-push-action@v5
with:
push: false
release:
if: ${{ github.ref_name == 'master' && needs.linux.outputs.changed == 'true' }}
needs:
- linux
- macos
- windows
- docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prantlf/unshelve-changes-action@v1
if: ${{ needs.linux.outputs.changed == 'true' }}
with:
files: ${{ needs.linux.outputs.changed-files }}
- uses: prantlf/unshelve-output-action@v5
- uses: prantlf/finish-release-action@v1
with:
no-node: true
no-tag-skip-ci: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}