Merge pull request #907 from herbie-fp/release-2.1 #24
Workflow file for this run
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 new Herbie release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
name: Build | |
strategy: | |
matrix: # manual matrix | |
include: | |
- os: windows-latest | |
os-name: windows | |
arch: x64 | |
- os: ubuntu-20.04 # keep old for glibc compatability | |
os-name: ubuntu | |
arch: x64 | |
- os: macos-latest | |
os-name: macOS-m1 | |
arch: arm64 | |
- os: macos-13 | |
os-name: macOS | |
arch: x64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Racket | |
uses: Bogdanp/[email protected] | |
with: | |
version: 8.11 | |
architecture: ${{ matrix.arch }} | |
- name: Install Rust compiler | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: build egg-herbie | |
run: cargo build --release --manifest-path=egg-herbie/Cargo.toml | |
- name: Create tarball | |
run: raco pkg create --format zip egg-herbie | |
- name: Rename tarballs | |
run: | | |
mv egg-herbie.zip egg-herbie-${{ matrix.os-name }}.zip | |
mv egg-herbie.zip.CHECKSUM egg-herbie-${{ matrix.os-name }}.zip.CHECKSUM | |
- name: Upload pre-built egg-herbie | |
uses: actions/upload-artifact@v4 | |
with: | |
path: egg-herbie-${{ matrix.os-name }}.zip | |
name: egg-herbie-${{ matrix.os-name }}.zip | |
if-no-files-found: error | |
- name: Upload pre-built egg-herbie checksum | |
uses: actions/upload-artifact@v4 | |
with: | |
path: egg-herbie-${{ matrix.os-name }}.zip.CHECKSUM | |
name: egg-herbie-${{ matrix.os-name }}.zip.CHECKSUM | |
if-no-files-found: error | |
release: | |
name: Create Initial Release | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download pre-built artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
pattern: egg-herbie-* | |
merge-multiple: true | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ github.ref }} | |
name: ${{ github.ref }} | |
commit: ${{ github.commit }} | |
draft: true | |
prerelease: false | |
artifactErrorsFailBuild: true | |
artifacts: "artifacts/*" |