Skip to content

Commit

Permalink
Provide build binaries via GitHub actions
Browse files Browse the repository at this point in the history
We now provide the pre-built nix binaries for every commit via GitHub
actions.

Signed-off-by: Sascha Grunert <[email protected]>
  • Loading branch information
saschagrunert authored and k8s-ci-robot committed Mar 13, 2023
1 parent 492c72d commit f64eaae
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ jobs:
name: security-profiles-operator
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
pushFilter: security-profiles-operator
- run: make nix nix-arm64
- run: make nix
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: build
path: build.tar.gz

bpf:
runs-on: ubuntu-22.04
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
.vagrant
Vagrantfile
build
build.tar.gz
image.tar
result
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,23 @@ image-arm64: ## Build the container image for arm64
image-cross: ## Build and push the container image manifest
hack/image-cross.sh

define nix-build-to
nix-build nix/default-$(1).nix
mkdir -p $(BUILD_DIR)/$(1)
cp -f result/* $(BUILD_DIR)/$(1)
endef

.PHONY: nix
nix: ## Build the binary via nix for the current system
nix-build nix
nix: nix-amd64 nix-arm64 ## Build all binaries via nix and create a build.tar.gz
tar cvfz build.tar.gz -C $(BUILD_DIR) amd64 arm64

.PHONY: nix-amd64
nix-amd64: ## Build the binary via nix for amd64
$(call nix-build-to,amd64)

.PHONY: nix-arm64
nix-arm64: ## Build the binary via nix for arm64
nix-build nix/default-arm64.nix
$(call nix-build-to,arm64)

.PHONY: update-nixpkgs
update-nixpkgs: ## Update the pinned nixpkgs to the latest master
Expand Down

0 comments on commit f64eaae

Please sign in to comment.