-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (93 loc) · 3.02 KB
/
ci.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Copyright 2024 Dotanuki Labs
# SPDX-License-Identifier: MIT
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
check-docs:
runs-on: ubuntu-24.04
steps:
- name: Project Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check typos on source files
uses: dotanuki-labs/github-actions/quality/typos@main
- name: Lint Markdown files
uses: dotanuki-labs/github-actions/quality/markdown@main
- name: Check MIT license on source files
uses: dotanuki-labs/github-actions/foss/check-licenses@main
with:
file-patterns: "*.sh,*.rs,*.yml,*.bats,*Dockerfile"
license: "mit"
- name: Build documentation assets
uses: dotanuki-labs/github-actions/foss/prepare-ghpages@main
lint:
runs-on: ubuntu-24.04
needs: check-docs
steps:
- name: Project Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Lint Bash scripts
uses: dotanuki-labs/github-actions/quality/bash@main
- name: Lint project
run: ./krabby.sh lint
tests:
runs-on: ubuntu-24.04
needs: check-docs
steps:
- name: Project Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup CI
uses: ./.github/actions/setup-rust
- name: Run tests
run: ./krabby.sh tests
e2e:
runs-on: ubuntu-24.04
needs: check-docs
strategy:
matrix:
resource: ["disk", "ram"]
steps:
- name: Project Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup CI
uses: ./.github/actions/setup-rust
- name: Cross-compilation against some targets
run: ./krabby.sh e2e ${{ matrix.resource }}
build:
needs: check-docs
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-24.04", "macos-14"]
steps:
- name: Project Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup CI
uses: ./.github/actions/setup-rust
- name: Run tests
run: ./krabby.sh assemble
- name: Archive binaries
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: gradle-wiper-binaries-${{ runner.os }}
path: artifacts
security-checks:
runs-on: ubuntu-24.04
needs: [build, lint, tests, e2e]
steps:
- name: Project Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup CI
uses: ./.github/actions/setup-rust
- name: Run security checks
run: ./krabby.sh security
- name: Generate SBOM
run: ./krabby.sh sbom
- name: Archive SBOM
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: sbom-${{ github.sha }}.json
path: gradle-wiper.cdx.json