name: Build VulkanEngine on: push: branches: - vkguide pull_request: workflow_dispatch: schedule: - cron: "@weekly" jobs: build: runs-on: ubuntu-latest container: git.alexdelcamp.fr/alexandre_1a/flake-actions:latest steps: - name: Checkout uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 - name: Configure run: | nix develop --command cmake -S . -B build \ -G Ninja \ -DCMAKE_BUILD_TYPE=Release - name: Debug Nix linker environment run: | nix develop --command bash -c ' echo "CC=$CC" echo "CXX=$CXX" echo "LD=$LD" echo echo "NIX_LDFLAGS:" printf "%s\n" "$NIX_LDFLAGS" echo echo "NIX_CFLAGS_LINK:" printf "%s\n" "$NIX_CFLAGS_LINK" ' - name: Build run: | nix develop --command cmake --build build \ --parallel 2 - name: Install ELF inspection tools run: | nix profile install \ nixpkgs#binutils \ nixpkgs#file \ nixpkgs#gnugrep - name: Check binaries run: | for bin in build/server/server build/engine/engine; do echo "========== $bin ==========" file "$bin" echo "--- INTERPRETER ---" readelf -l "$bin" | grep 'Requesting program interpreter' || true echo "--- DYNAMIC SECTION ---" readelf -d "$bin" | grep -E 'RPATH|RUNPATH|NEEDED' || true echo "--- NIX STORE REFERENCES ---" strings "$bin" | grep '/nix/store' || true done - name: Upload build uses: actions/upload-artifact@v4 with: name: VulkanEngine-linux-x86_64 path: build/ - name: Verify Nix independence run: | mkdir -p /tmp/vulkan-test cp build/server/server /tmp/vulkan-test/ cp build/engine/engine /tmp/vulkan-test/ echo "=== Nix references ===" if strings /tmp/vulkan-test/server | grep -q '/nix/store'; then echo "ERROR: server contains /nix/store reference" exit 1 fi if strings /tmp/vulkan-test/engine | grep -q '/nix/store'; then echo "ERROR: engine contains /nix/store reference" exit 1 fi echo "OK: no /nix/store references" - name: Notify routine if: always() run: | curl \ -H "Title: [Routine] VulkanEngine build" \ -d "Build finished (status: ${{ job.status }})" \ https://ntfy.alexdelcamp.fr/FlakeBuild