Skip to content

Commit

Permalink
.github/workflows: build and test for all three supported archs
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Klotz <aklotz@ohmsoft.com>
  • Loading branch information
dblohm7 committed Jan 19, 2024
1 parent 608eace commit b6f639e
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,34 @@ jobs:
- name: Install go-winres
run: go install github.com/tc-hib/go-winres@latest

- name: Set up build directory
run: mkdir -p ./bin
- name: Set up build directories
run: |
mkdir -p ./bin/386
mkdir -p ./bin/amd64
mkdir -p ./bin/arm64
- name: Build
shell: bash
run: |
go build -v -o ./bin ./...
go test -c -o ./bin ./...
for d in $(ls -d ./bin/*/); do
local arch=$(basename ${d})
GOARCH=${arch} go build -v -o ${d} ./...
GOARCH=${arch} go test -c -o ${d} ./...
done
- name: Bind resources to all binaries
shell: bash
run: |
for f in ./bin/*.exe; do
go-winres patch $f
for d in $(ls -d ./bin/*/); do
for f in $(ls ${d}*.exe); do
go-winres patch ${f}
done
done
- name: Test
run: go test -o ./bin -v ./...
shell: bash
run: |
for d in $(ls -d ./bin/*/); do
local arch=$(basename ${d})
GOARCH=${arch} go test -o ${d} -v ./...
done

0 comments on commit b6f639e

Please sign in to comment.