@@ -2,9 +2,6 @@ name: build
22
33on :
44 workflow_call :
5- inputs :
6- version :
7- type : string
85
96jobs :
107 static :
1310 image : debian:bookworm-slim
1411 steps :
1512 - uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 0
15+ fetch-tags : true
1616 - run : |
1717 apt-get update -qq
1818 apt-get install -y --no-install-recommends ca-certificates gcc libc6-dev
@@ -26,18 +26,18 @@ jobs:
2626 ~/go/bin/staticcheck ./...
2727 go test ./... -failfast -vet off -tags netgo,sqlite_omit_load_extension,fts5 -race
2828 - run : |
29- CGO_CFLAGS="-O2 -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants" go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags '-static -Wl,--gc-sections' -X github.com/dimkr/tootik/buildinfo.Version=${{ inputs.version }} " -trimpath -o tootik-amd64 ./cmd/tootik
29+ CGO_CFLAGS="-O2 -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants" go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags '-static -Wl,--gc-sections'" -trimpath -o tootik-amd64 ./cmd/tootik
3030 - run : |
3131 apt-get install -y gcc-aarch64-linux-gnu
32- CGO_CFLAGS="-O2 -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants" GOARCH=arm64 CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags '-static -Wl,--gc-sections' -X github.com/dimkr/tootik/buildinfo.Version=${{ inputs.version }} " -trimpath -o tootik-arm64 ./cmd/tootik
32+ CGO_CFLAGS="-O2 -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants" GOARCH=arm64 CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags '-static -Wl,--gc-sections'" -trimpath -o tootik-arm64 ./cmd/tootik
3333 - run : |
3434 apt-get install -y gcc-arm-linux-gnueabihf
35- CGO_CFLAGS="-O2 -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants" GOARCH=arm CC=arm-linux-gnueabihf-gcc CGO_ENABLED=1 go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags '-static -Wl,--gc-sections' -X github.com/dimkr/tootik/buildinfo.Version=${{ inputs.version }} " -trimpath -o tootik-arm ./cmd/tootik
35+ CGO_CFLAGS="-O2 -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants" GOARCH=arm CC=arm-linux-gnueabihf-gcc CGO_ENABLED=1 go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags '-static -Wl,--gc-sections'" -trimpath -o tootik-arm ./cmd/tootik
3636 - run : |
3737 apt-get install -y gcc-multilib
38- CGO_CFLAGS="-O2 -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants" GOARCH=386 CGO_ENABLED=1 go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags '-static -Wl,--gc-sections' -X github.com/dimkr/tootik/buildinfo.Version=${{ inputs.version }} " -trimpath -o tootik-386 ./cmd/tootik
38+ CGO_CFLAGS="-O2 -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants" GOARCH=386 CGO_ENABLED=1 go build -tags netgo,sqlite_omit_load_extension,fts5 -ldflags "-w -s -linkmode external -extldflags '-static -Wl,--gc-sections'" -trimpath -o tootik-386 ./cmd/tootik
3939 - uses : actions/upload-artifact@v4
4040 with :
41- name : tootik-${{ inputs.version }}
41+ name : tootik-${{ github.ref_name }}
4242 path : tootik-*
4343 retention-days : 1
0 commit comments