-
Notifications
You must be signed in to change notification settings - Fork 20
91 lines (78 loc) · 2.73 KB
/
ci.yml
File metadata and controls
91 lines (78 loc) · 2.73 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
name: ci
on:
workflow_dispatch:
workflow_call:
push:
branches: [ main ]
pull_request:
paths:
- '.github/workflows/ci.yml'
- '**/*.go'
- testdata/**/*
- 'makefile'
- 'go.mod'
- 'go.sum'
- '!**/*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-and-verify:
uses: Open-CMSIS-Pack/workflows-and-actions-collection/.github/workflows/build-and-verify.yml@v1.0.3
secrets:
QLTY_COVERAGE_TOKEN: ${{ secrets.QLTY_COVERAGE_TOKEN }}
with:
program: cpackget
test-matrix: '[{"platform":"windows-2022","arch":"amd64"},{"platform":"ubuntu-24.04","arch":"amd64"},{"platform":"macos-14","arch":"amd64"},{"platform":"ubuntu-24.04","arch":"arm64"}]'
go-version-file: ./go.mod
enable-qlty-coverage: true
# Make sure local_repository.pidx is linted against PackIndex.xsd
xmllint:
name: Xmllint
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: Check out repository code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
check-latest: true
- name: Install xmllint
run: sudo apt-get update && sudo apt-get install libxml2-utils
- name: Archive tpip report
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: tpip-report
path: ./build/cpackget-ubuntu-amd64.txt
- name: Check if local_repository.pidx is valid
run: |
make test-xmllint-localrepository
publish-test-results:
name: "Publish Tests Results"
needs: [ build-and-verify ]
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' && github.workflow != 'Release' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: Download Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: artifacts
- name: publish test results
uses: EnricoMi/publish-unit-test-result-action/linux@c950f6fb443cb5af20a377fd0dfaa78838901040 # v2.23.0
with:
files: artifacts/**/cpackget-testreport-*.xml
report_individual_runs: true