Skip to content

Commit 25253bb

Browse files
committed
ci: put macos and linux release in same workflow
1 parent 01c27e5 commit 25253bb

File tree

2 files changed

+88
-93
lines changed

2 files changed

+88
-93
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 88 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 88 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,95 @@
11
name: "Release"
22
on:
3-
workflow_run:
4-
workflows: ["macOS Binary"]
5-
types:
6-
- completed
3+
push:
4+
tags:
5+
- '[a-z]+/[0-9]+.[0-9]+.[0-9]+'
6+
77
jobs:
8-
release:
8+
macosRelease:
9+
runs-on: ${{ matrix.os }}
10+
name: macosRelease
11+
strategy:
12+
matrix:
13+
os:
14+
- macos-latest
15+
include:
16+
- os: macos-latest
17+
brew: automake
18+
19+
steps:
20+
- name: Workaround for actions/cache#403
21+
if: runner.os == 'macOS'
22+
run: |
23+
brew install gnu-tar
24+
echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV
25+
26+
- name: Get Packages
27+
uses: mstksg/get-package@v1
28+
with:
29+
brew: ${{ matrix.brew }}
30+
apt-get: ${{ matrix.apt-get }}
31+
32+
- name: Checkout
33+
uses: actions/checkout@v2
34+
35+
- name: Cache Local
36+
id: cache-local
37+
uses: actions/cache@v1
38+
with:
39+
path: ~/.local/
40+
key: ${{ runner.os }}-local-v3
41+
42+
- name: Cache Stack
43+
id: cache-stack
44+
uses: actions/cache@v1
45+
with:
46+
path: ~/.stack
47+
key: ${{ runner.os }}-stack-v3
48+
49+
- name: Build Binaries
50+
run: |
51+
.github/scripts/install-solc.sh
52+
.github/scripts/install-z3.sh
53+
.github/scripts/install-cvc4.sh
54+
env:
55+
HOST_OS: ${{ runner.os }}
56+
57+
- name: Build Libraries
58+
run: |
59+
.github/scripts/install-libsecp256k1.sh
60+
.github/scripts/install-libff.sh
61+
env:
62+
HOST_OS: ${{ runner.os }}
63+
64+
- name: Build Dependencies
65+
run: |
66+
cd src/hevm && stack build --ghc-options="-Werror" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib --only-dependencies && cd ../..
67+
68+
- name: Build and install hevm
69+
run: |
70+
cd src/hevm && stack install --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib && cd ../..
71+
72+
- name: Test
73+
run: |
74+
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$HOME/.local/lib"
75+
export PATH="${PATH}:$HOME/.local/bin"
76+
77+
cp "$HOME/.local/bin/solc-0.6.12" "$HOME/.local/bin/solc"
78+
cd src/hevm && stack test --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib && cd ../..
79+
80+
- name: Amend and compress binaries (macOS)
81+
if: runner.os == 'macOS'
82+
run: .github/scripts/build-macos-release.sh
83+
84+
- name: Upload artifact
85+
uses: actions/upload-artifact@v1
86+
with:
87+
name: hevm-${{ runner.os }}
88+
path: hevm.tar.gz
89+
90+
linuxRelease:
991
name: Create Release
92+
needs: macosRelease
1093
runs-on: ubuntu-latest
1194
steps:
1295
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)