forked from opsengine/cpulimit
-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (71 loc) · 2.05 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
name: CI
on:
push:
branches: [ master ]
workflow_dispatch:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: build
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-12, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@main
with:
ref: master
fetch-depth: 0
- name: Compile dynamic
if: ${{ startsWith( matrix.os, 'macos-' ) }}
run: |
make
sudo ./tests/process_iterator_test
cp ./tests/process_iterator_test ./tests/abcdefghijklmnopqrstuvwxyzabcdefghi
sudo ./tests/abcdefghijklmnopqrstuvwxyzabcdefghi
- name: Compile static
if: ${{ startsWith( matrix.os, 'ubuntu-' ) }}
run: |
make LDFLAGS="-static"
sudo ./tests/process_iterator_test
cp ./tests/process_iterator_test ./tests/abcdefghijklmnopqrstuvwxyzabcdefghi
sudo ./tests/abcdefghijklmnopqrstuvwxyzabcdefghi
- name: Upload
uses: actions/upload-artifact@main
with:
name: cpulimit-${{ matrix.os }}
path: src/cpulimit
build-FreeBSD:
name: build-FreeBSD
permissions:
contents: read
strategy:
matrix:
osver: ['13.2', '14.0']
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Build in FreeBSD
uses: vmactions/freebsd-vm@v1
with:
release: ${{ matrix.osver }}
usesh: true
prepare: |
pkg install -y lang/gcc gmake sudo
run: |
gmake
sudo ./tests/process_iterator_test
cp ./tests/process_iterator_test ./tests/abcdefghijklmnopqrstuvwxyzabcdefghi
sudo ./tests/abcdefghijklmnopqrstuvwxyzabcdefghi
- name: Upload
uses: actions/upload-artifact@main
with:
name: cpulimit-FreeBSD-${{ matrix.osver }}
path: src/cpulimit