forked from lambdaclass/cairo-vm
-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (72 loc) · 2.3 KB
/
fresh_run.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Install dependencies, build the project and run tests from zero
on:
schedule:
# At the end of every day
- cron: "0 0 * * *"
env:
PROPTEST_CASES: 10000
jobs:
fresh_run:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
deps_suffix: ''
os_name: ubuntu-22.04
- os: [self-hosted, macOS]
deps_suffix: '-macos'
os_name: macos
runs-on: ${{ matrix.os_name }}
name: "Make deps, build & test on fresh ${{ matrix.os_name }} system"
steps:
# Runner runs out of disk space when running this job
# This solution was propossed on an issue in the github actions repo
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
- name: Free up space on ubuntu runner
if: matrix.os_name == 'ubuntu-22.04'
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/[email protected]
- name: Install Pyenv
uses: "gabrielfalcao/pyenv-action@v13"
- name: Install Rosetta
if: matrix.os_name == 'macos'
run: softwareupdate --install-rosetta --agree-to-license
- name: Run make deps${{ matrix.deps_suffix }}
id: deps
run: make deps${{ matrix.deps_suffix }}
- name: Run make build
id: build
run: make build
- name: Run make test
id: test
run: |
. cairo-vm-env/bin/activate; \
make test
- name: Check which step failed
if: failure()
run: |
if [ ${{ steps.deps.outcome }} = failure ]; then
FAILED_TARGET=deps${{ matrix.deps_suffix }}
elif [ ${{ steps.build.outcome }} = failure ]; then
FAILED_TARGET=build
else
FAILED_TARGET=test
fi
echo "FAILED_TARGET=$FAILED_TARGET" >> $GITHUB_ENV
- name: Create Issue
if: ${{ failure() }}
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OS: ${{ matrix.os_name}}
COMMIT_SHA: ${{ github.sha }}
with:
filename: .github/ISSUE_TEMPLATE/fresh_run_failure.md