[mod] add $(CPPFLAGS) to makefile %.o rule #55
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
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| # The branches below must be a subset of the branches above | |
| branches: [master] | |
| schedule: | |
| - cron: '0 22 * * 2' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Checkout the repository | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # Step 2: Set up the Zig compiler | |
| - name: Setup Zig Compiler | |
| uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.15.2 # Specify the Zig version you need | |
| # Step 3: Build the Zig binary | |
| - name: Build Zig Binary | |
| run: | | |
| cd server | |
| zig build -Dcpu=baseline -Doptimize=ReleaseSafe -freference-trace=11 -Dpie=true -Drelro=true -Dsystem_libs=false | |
| # zig build -Dcpu=baseline -Doptimize=Debug -freference-trace=11 -Dpie=true -Drelro=true -Dsystem_libs=false | |
| sudo cp zig-out/bin/klutshnikd /usr/bin | |
| # Step 4: build libklutshnik and test | |
| - run: | | |
| sudo apt update | |
| sudo apt install -y libsodium-dev pkgconf # build-essential git python3-pip | |
| # liboprf | |
| git clone https://github.com/stef/liboprf/ | |
| cd liboprf/src | |
| sudo mkdir -p /usr/include/oprf/ | |
| sudo PREFIX=/usr make install | |
| # pyoprf | |
| pip3 install ../python/ | |
| cd ../.. | |
| # libklutshnik | |
| sudo PREFIX=/usr make install | |
| # klutshnik | |
| pip3 install python/ | |
| sudo ldconfig | |
| cd test | |
| mkdir keystore | |
| mkdir otherclient/keystore | |
| KLUTSHNIKD=/usr/bin/klutshnikd python3 -m unittest discover -fcb -v . | |
| cd ../server/seccomp | |
| make | |
| # Step 5: Upload the binary as an artifact (optional) | |
| - name: Upload Binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: klutshnikd-static | |
| path: server/zig-out/bin/klutshnikd | |
| - name: Upload Seccomp BPF | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: klutshnikd.bpf | |
| path: server/seccomp/target.bpf | |
| - name: Upload Seccomp Profile | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: klutshnikd.seccomp | |
| path: server/seccomp/target.seccomp |