-
Notifications
You must be signed in to change notification settings - Fork 14
81 lines (72 loc) · 2.15 KB
/
build-and-test.yaml
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
name: Build and Test
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
env:
UNIT_TESTS_RESULTS_XML: unit-tests-results.xml
RUSTC_BOOTSTRAP: 1
# Cancel the workflow if any new changes pushed to a feature branch or the trunk
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
cargo-check:
runs-on: ubuntu-latest
container:
image: matterlabs/llvm_runner:ubuntu22-llvm17-latest
steps:
- uses: actions/checkout@v4
- name: Cargo checks
uses: matter-labs/era-compiler-ci/.github/actions/cargo-check@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build-and-test:
needs: cargo-check
strategy:
fail-fast: false
matrix:
include:
- name: "Linux x86_64"
image: matterlabs/llvm_runner:ubuntu22-llvm17-latest
runner: matterlabs-ci-runner-high-performance
- name: "Linux aarch64"
image: matterlabs/llvm_runner:ubuntu22-llvm17-latest
runner: matterlabs-ci-runner-arm
- name: "MacOS x86"
runner: macos-12-large
- name: "Windows"
runner: windows-2022-github-hosted-16core
runs-on: ${{ matrix.runner }}
name: ${{ matrix.name }}
container:
image: ${{ matrix.image || '' }}
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Prepare Windows env
if: runner.os == 'Windows'
uses: matter-labs/era-compiler-ci/.github/actions/prepare-msys@v1
- name: Prepare MacOS environment
shell: bash
if: runner.os == 'macOS'
run: brew install cmake ninja
- name: Build and test
uses: ./.github/actions/build_and_test
# Special job that allows some of the jobs to be skipped or failed
# requiring others to be successful
pr-checks:
runs-on: ubuntu-latest
if: always()
needs:
- cargo-check
- build-and-test
steps:
- name: Decide on PR checks
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}