-
-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (73 loc) · 2.06 KB
/
build-and-test.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
85
86
87
name: evm-signer-kms
on:
push:
branches:
- master
- feat/**
- fix/**
- chore/**
- test/**
- ci/**
tags:
- v[0-9]+.[0-9]+.[0-9]+
pull_request:
branches:
- master
permissions:
id-token: write
contents: read
jobs:
run-tests:
name: Execute tests and measure coverage
runs-on: ubuntu-latest
env:
LCOV_OUT: test-coverage.lcov
KMS_KEY_ID: ${{ secrets.KMS_KEY_ID }}
steps:
- name: Checkout codebase
uses: actions/checkout@v4
- name: Install llvm-cov for code coverage
uses: taiki-e/install-action@cargo-llvm-cov
- name: Assume AWS role
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_KMS_IAM_ROLE }}
role-session-name: ${{ vars.AWS_STS_SESSION_NAME}}
mask-aws-account-id: true
- name: Run unit and integration tests
env:
LLVM_COV_ARGS: --lcov --output-path ${{ env.LCOV_OUT }}
run: |
make fetch-public-key
make test-coverage
- name: Run doc tests
run: make doc-test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./${{ env.LCOV_OUT }}
fail_ci_if_error: true
build-x86-gnu:
name: Build for x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v4
- name: Build for x86_64-unknown-linux-gnu
run: make build
build-x86-musl:
name: Build for x86_64-unknown-linux-musl
env:
TOOL_CHAIN : x86_64-unknown-linux-musl
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v4
- name: Install musl toolchain
run: |
sudo apt install musl-tools
rustup target add --toolchain stable ${{ env.TOOL_CHAIN }}
- name: Build for x86_64-unknown-linux-musl
run: make build