-
Notifications
You must be signed in to change notification settings - Fork 20
103 lines (96 loc) · 2.75 KB
/
ci.yml
File metadata and controls
103 lines (96 loc) · 2.75 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
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
jobs:
test-makefile:
name: Build and test makefile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.25"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y make tar diffutils bzip2 gzip curl git
- name: Run make
run: make
test-fedora:
name: Build and test Fedora on multiple runners
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, ubuntu-24.04-arm]
container:
image: quay.io/fedora/fedora:latest
options: --user root
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install dependencies
run: |
dnf update -y
dnf install -y golang make tar diffutils bzip2 gzip curl git which
- name: Mark repo as safe for git
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Build and test
run: make
version-release:
runs-on: ubuntu-latest
needs: [test-makefile, test-fedora, test-macos, test-windows]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Github app installation token
uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PK }}
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
token: ${{ steps.app-token.outputs.token }}
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v6
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
test-macos:
name: Build and test on macOS
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, macos-26-intel ]
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install dependencies
run: |
brew update
brew install golang make diffutils git grep gnu-tar
- name: Build and test
run: make
test-windows:
name: Build and test on Windows
runs-on: ${{ matrix.os }}
env:
CGO_ENABLED: 0
strategy:
matrix:
os: [ windows-latest, windows-11-arm ]
steps:
- name: Check out repository
uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.25"
- name: Install dependencies
run: |
choco install -y make diffutils gzip bzip2 git
- name: Build and test
run: bash -c "make"