Skip to content

Commit 19ababc

Browse files
committed
use makefile rather than action
Signed-off-by: David Justice <david@devigned.com>
1 parent 092d360 commit 19ababc

3 files changed

Lines changed: 44 additions & 10 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ jobs:
2929
sudo add-apt-repository ppa:cncf-buildpacks/pack-cli
3030
sudo apt-get update
3131
sudo apt-get install pack-cli
32-
- name: Build base images and create builder
32+
- name: Build and test
3333
run: |
34-
./base-images/build.sh wasm
35-
pack builder create wasm/demo-builder:wasm --config ./builders/wasm/builder.toml
36-
- name: Run compose buildpack
37-
run: |
38-
pack build test-wasm-compose --builder wasm/demo-builder:wasm --path ./apps/compose -v
39-
- name: Run individual buildpack
40-
run: |
41-
pack build test-wasm-individual --builder wasm/demo-builder:wasm --path ./apps/js -v
34+
make build test

Makefile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
SHELL:=/usr/bin/env bash
2+
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
3+
.DEFAULT_GOAL:=help
4+
5+
## --------------------------------------
6+
## Build
7+
## --------------------------------------
8+
9+
##@ Build:
10+
11+
.PHONY: build
12+
build: build-base-images build-builder ## Build all of the things \o/
13+
14+
.PHONY: build-base-images
15+
build-base-images: ## Build the base images.
16+
./base-images/build.sh wasm
17+
18+
.PHONY: build-builder
19+
build-builder: ## Build the builder image.
20+
pack builder create wasm/demo-builder:wasm --config ./builders/wasm/builder.toml
21+
22+
23+
## --------------------------------------
24+
## Test
25+
## --------------------------------------
26+
27+
##@ Test:
28+
29+
.PHONY: test
30+
test: test-js test-compose ## Run all tests.
31+
32+
.PHONY: test-compose
33+
test-compose: ## Test the compose project.
34+
pack build test-wasm-compose --builder wasm/demo-builder:wasm --path apps/compose
35+
36+
.PHONY: test-js
37+
test-js: ## Test the JS app.
38+
pack build test-wasm-js --builder wasm/demo-builder:wasm --path apps/js
39+
40+
help: ## Display this help.
41+
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[0-9a-zA-Z_-]+:.*?##/ { printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

base-images/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
DEFAULT_PREFIX=wasm/demo-base
5-
DEFAULT_PLATFORM="linux/amd64"
5+
DEFAULT_PLATFORM="linux/amd64,linux/arm64"
66

77
REPO_PREFIX=${DEFAULT_PREFIX}
88
PLATFORM=${DEFAULT_PLATFORM}

0 commit comments

Comments
 (0)