-
Notifications
You must be signed in to change notification settings - Fork 14
78 lines (68 loc) · 2.07 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
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:
# Check for cargo licensing issues
cargo-license:
uses: matter-labs/era-compiler-ci/.github/workflows/cargo-license.yaml@v1
secrets: inherit
# Check for secrets leak in the repository
secrets-scanner:
uses: matter-labs/era-compiler-ci/.github/workflows/secrets-scanner.yaml@v1
secrets: inherit
check-formatting:
name: Check formatting
runs-on: ubuntu-latest
container:
image: matterlabs/llvm_runner:ubuntu22-llvm17-latest
steps:
- uses: actions/checkout@v4
- name: Run fmt
run: cargo fmt --check
- name: Run clippy
run: cargo clippy
build-and-test:
needs: check-formatting
strategy:
fail-fast: false
matrix:
include:
- name: "Linux x86_64"
image: matterlabs/llvm_runner:ubuntu22-llvm17-latest
runner: matterlabs-ci-runner
- 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