@@ -2,9 +2,6 @@ name: build
2
2
3
3
on :
4
4
workflow_call:
5
- inputs :
6
- version :
7
- type : string
8
5
9
6
jobs :
10
7
static:
13
10
image: debian:bookworm-slim
14
11
steps:
15
12
- uses: actions/checkout@v4
13
+ with:
14
+ fetch-depth: 0
15
+ fetch-tags: true
16
16
- run: |
17
17
apt-get update -qq
18
18
apt-get install -y --no-install-recommends ca-certificates gcc libc6-dev
@@ -26,18 +26,18 @@ jobs:
26
26
~/go/bin/staticcheck ./...
27
27
go test ./... -failfast -vet off -tags netgo,sqlite_omit_load_extension,fts5 -race
28
28
- 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
30
30
- run: |
31
31
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
33
33
- run: |
34
34
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
36
36
- run: |
37
37
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
39
39
- uses: actions/upload-artifact@v4
40
40
with:
41
- name : tootik-${{ inputs.version }}
41
+ name: tootik-${{ github.ref_name }}
42
42
path: tootik-*
43
43
retention-days: 1
0 commit comments