-
Notifications
You must be signed in to change notification settings - Fork 33
69 lines (64 loc) · 2.19 KB
/
distribute.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Distribute
on: [push]
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.12
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