-
-
Notifications
You must be signed in to change notification settings - Fork 4k
66 lines (63 loc) · 1.88 KB
/
golang_validation.yml
File metadata and controls
66 lines (63 loc) · 1.88 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
name: Golang validation
permissions:
contents: read
actions: write
on:
workflow_dispatch:
pull_request:
paths:
- 'packages/golang/build.sh'
- 'scripts/build/setup/termux_setup_golang.sh'
jobs:
planning:
runs-on: ubuntu-slim
strategy:
matrix:
target_arch: [aarch64, arm, i686, x86_64]
steps:
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Generate test matrix list
run: ./scripts/bin/validation ${{ matrix.target_arch }} golang list | tee list.txt
- name: Get test matrix batch
id: list
run: |
echo "batch=$(grep -Po '^Batches \(actual\):\s*\K(\d+)' list.txt | python3 -c 'import json,sys;num = int(sys.stdin.readline().rstrip());print(json.dumps([i for i in range(1, num+1)]))')" | tee -a "$GITHUB_OUTPUT"
outputs:
batch: ${{ steps.list.outputs.batch }}
golang_validation:
needs: planning
runs-on: ubuntu-latest
strategy:
matrix:
target_arch: [aarch64, arm, i686, x86_64]
batch: ${{ fromJson(needs.planning.outputs.batch) }}
fail-fast: false
steps:
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Enable zram
uses: ./.github/actions/zram
with:
algorithm: zstd
size: 16G
priority: 100
device_name: /dev/zram0
- name: Load Docker image
run: |
./scripts/run-docker.sh true
- name: Free additional disk space
run: |
./scripts/free-space.sh
- name: Golang validation
run: ./scripts/bin/validation ${{ matrix.target_arch }} golang ${{ matrix.batch }} || exit 1
- name: Upload report artifact
if: always()
uses: actions/upload-artifact@v6
with:
name: report-${{ matrix.target_arch }}-${{ matrix.batch }}
path: /tmp/golang-validation-report.txt