This repository was archived by the owner on Jan 11, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (61 loc) · 1.82 KB
/
build.yml
File metadata and controls
76 lines (61 loc) · 1.82 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
name: Build Storage Cleaner
on:
push:
tags: [ 'v*.*.*' ]
workflow_dispatch:
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x64]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libudev-dev clang
- name: Build for Linux ${{ matrix.arch }}
run: |
clang -o storage_cleaner storage_cleaner.c -ludev -lpthread -Os -s
- name: Upload Linux binary
uses: actions/upload-artifact@v4
with:
name: storage_cleaner-linux-${{ matrix.arch }}
path: storage_cleaner
build-macos:
runs-on: macos-latest
strategy:
matrix:
arch: [x64, arm64]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build for macOS ${{ matrix.arch }}
run: |
if [ "${{ matrix.arch }}" = "arm64" ]; then
clang -o storage_cleaner storage_cleaner.c -framework DiskArbitration -framework IOKit -Os -s -arch arm64
else
clang -o storage_cleaner storage_cleaner.c -framework DiskArbitration -framework IOKit -Os -s -arch x86_64
fi
- name: Upload macOS binary
uses: actions/upload-artifact@v4
with:
name: storage_cleaner-macos-${{ matrix.arch }}
path: storage_cleaner
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Build for Windows
run: |
cl storage_cleaner.c /link setupapi.lib cfgmgr32.lib /O2 /Fe:storage_cleaner.exe
- name: Upload Windows binary
uses: actions/upload-artifact@v4
with:
name: storage_cleaner-windows-x64
path: storage_cleaner.exe