-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (78 loc) · 2.54 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
# 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'
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 Rust tests
run: ./krabby.sh tests
build:
needs: check-docs
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ 'ubuntu-22.04', 'macos-14' ]
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 assemble
- name: Archive binaries
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: gwv-binaries-${{ runner.os }}
path: artifacts
security:
runs-on: ubuntu-24.04
needs: [lint, tests, build]
steps:
- name: Project Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check supply-chain issues
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: gwv.cdx.json