Skip to content

Merge pull request #1107 from herbie-fp/cleanup-shell #4407

Merge pull request #1107 from herbie-fp/cleanup-shell

Merge pull request #1107 from herbie-fp/cleanup-shell #4407

Workflow file for this run

name: Distribute
on:
push:
branches:
- main
env:
RUST_BACKTRACE: full
jobs:
distribute:
strategy:
matrix:
include:
- os: macos-latest
arch: aarch64
- os: macos-13
arch: x64
- os: ubuntu-latest
arch: x64
- os: windows-latest
arch: x64
runs-on: ${{ matrix.os }}
steps:
- name: "Install Racket"
uses: Bogdanp/[email protected]
with:
version: "8.14"
architecture: ${{ matrix.arch }}
# WARN: need to be careful with cargo paths
- name: Cache Racket dependencies
uses: actions/cache@v4
with:
key: ${{ runner.os }}-deps
path: |
~/.cache/racket
~/.local/share/racket
~/Library/Racket/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
egg-herbie/target/
${{ env.APPDATA }}/Racket
- name: Install Rust compiler
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- uses: actions/checkout@master
- name: "Install dependencies"
run: make install
# Build executable and remove Herbie launcher
- name: "Build standalone executable"
run: make distribution
- name: "Uninstall Herbie launcher"
run: raco pkg remove herbie egg-herbie
# Test executable
- name: "Test executable, improve tool (Windows)"
if: runner.os == 'Windows'
run: herbie-compiled/herbie.exe improve --threads yes bench/tutorial.fpcore improve.fpcore
- name: "Test executable, improve tool (Linux / MacOS)"
if: runner.os != 'Windows'
run: herbie-compiled/bin/herbie improve --threads yes bench/tutorial.fpcore improve.fpcore
- name: "Test executable, report tool (Windows)"
if: runner.os == 'Windows'
run: herbie-compiled/herbie.exe report --threads yes bench/tutorial.fpcore graphs
- name: "Test executable, report tool (Linux / MacOS)"
if: runner.os != 'Windows'
run: herbie-compiled/bin/herbie report --threads yes bench/tutorial.fpcore graphs