Updated CI (v2.0.8) #62
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: Publish binaries | |
on: push | |
env: | |
CARGO_TERM_COLOR: always | |
permissions: | |
contents: write | |
jobs: | |
build-and-publish: | |
name: ${{ matrix.platform.os_name }} with rust ${{ matrix.toolchain }} | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- os_name: Linux-aarch64 | |
os: ubuntu-20.04 | |
target: aarch64-unknown-linux-musl | |
bin: circom-linux-arm64 | |
- os_name: Linux-x86_64 | |
os: ubuntu-20.04 | |
target: x86_64-unknown-linux-gnu | |
bin: circom-linux-amd64 | |
- os_name: Windows-x86_64 | |
os: windows-latest | |
target: x86_64-pc-windows-msvc | |
bin: circom-windows-amd64.exe | |
- os_name: Windows-aarch64 | |
os: windows-latest | |
target: aarch64-pc-windows-msvc | |
bin: circom-windows-arm64.exe | |
- os_name: macOS-x86_64 | |
os: macOS-latest | |
target: x86_64-apple-darwin | |
bin: circom-macos-amd64 | |
- os_name: macOS-aarch64 | |
os: macOS-latest | |
target: aarch64-apple-darwin | |
bin: circom-macos-arm64 | |
toolchain: | |
- stable | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'v2.0.8' | |
fetch-depth: '0' | |
- name: Build binary | |
uses: houseabsolute/actions-rust-cross@v0 | |
with: | |
command: "build" | |
target: ${{ matrix.platform.target }} | |
toolchain: ${{ matrix.toolchain }} | |
args: "--release" | |
strip: true | |
- name: Rename binary (linux and macos) | |
run: mv target/${{ matrix.platform.target }}/release/circom target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }} | |
if: matrix.platform.os_name != 'Windows-x86_64' && matrix.platform.os_name != 'Windows-aarch64' | |
- name: Rename binary (windows) | |
run: mv target/${{ matrix.platform.target }}/release/circom.exe target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }} | |
if: matrix.platform.os_name == 'Windows-x86_64' || matrix.platform.os_name == 'Windows-aarch64' | |
- name: Generate SHA-256 | |
run: shasum -a 256 target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }} | cut -d ' ' -f 1 > target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}.sha256 | |
- name: Release binary and SHA-256 checksum to GitHub | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: 'v2.0.8' | |
tag_name: 'v2.0.8' | |
files: | | |
target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }} | |
target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}.sha256 |