-
Notifications
You must be signed in to change notification settings - Fork 26
111 lines (106 loc) · 4 KB
/
coverage.yml
File metadata and controls
111 lines (106 loc) · 4 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
on: workflow_call
jobs:
start-runner:
name: Start self-hosted EC2 runner
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION_BENCHMARK }}
- name: Start EC2 runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2.4.2
with:
mode: start
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
# Ubuntu 22.04 AMI
ec2-image-id: ami-09fabd03bb09b3704
ec2-instance-type: c7i.xlarge
subnet-id: ${{ secrets.AWS_EC2_SUBNET_ID_BENCHMARK }}
security-group-id: ${{ secrets.AWS_EC2_SG_ID_BENCHMARK }}
codecov:
name: codecov job
needs: start-runner # required to start the main job when the runner is ready
runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
steps:
- name: Pre checkout deps
run: sudo apt-get update && sudo apt-get install -y git
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Print CPU information
run: |
echo "=== CPU Information ==="
if command -v lscpu >/dev/null 2>&1; then
echo "--- lscpu output ---"
lscpu
else
echo "--- Fallback CPU info ---"
cat /proc/cpuinfo 2>/dev/null || echo "CPU info not available"
fi
echo "Runner OS: $RUNNER_OS"
echo "Runner Architecture: ${{ runner.arch }}"
echo "========================"
- name: install dependencies
run: sudo .install/install_script.sh
- name: Install clang 18
run: |
# Download and run the official LLVM installation script
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
sudo apt-get install -yqq clang-18 clang++-18
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-18
echo `clang --version`
echo `clang++ --version`
- name: run codecov
run: make coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./bin/Linux-x86_64-debug/cov.info
token: ${{ secrets.CODECOV_TOKEN }}
disable_safe_directory: true
disable_search: true
- name: Sanitizer tests
run: make asan
- name: Set test path
if: failure()
id: tests-artifact-path
run: |
FULL_VARIANT=$(uname)-$(uname -m)-debug-asan
echo "path=bin/${FULL_VARIANT}/unit_tests/Testing/Temporary/" >> $GITHUB_OUTPUT
- name: Archive san tests reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: san tests reports on intel
path: ${{ steps.tests-artifact-path.outputs.path }}
stop-runner:
name: Stop self-hosted EC2 runner
needs:
- start-runner
- codecov
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION_BENCHMARK }}
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2.4.2
with:
mode: stop
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
label: ${{ needs.start-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}