This repository was archived by the owner on Jan 11, 2026. It is now read-only.
Repository navigation
Build Storage Cleaner #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |