Skip to content

Commit

Permalink
working with zig locally
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-zorn committed Aug 12, 2024
1 parent 936e14b commit 6207b4b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/actions/mike-test-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ runs:
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: build --verbose --snapshot --config .goreleaser.zig.yaml
args: build --verbose --snapshot --config .goreleaser.yaml
env:
GITHUB_TOKEN: ${{ inputs.token }}
HOMEBREW_DEPLOY_KEY: ${{ inputs.homebrew-gh-secret }}
Expand Down
27 changes: 15 additions & 12 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
before:
hooks:
- sudo apt-get install libc6-dev-i386 musl-tools musl-dev
builds:
- id: ldcli
binary: ldcli
goos:
- linux
# WIP - darwin
# WIP - windows
# WIP issue with -x - darwin
- windows
goarch:
- 386
- amd64
Expand All @@ -17,16 +14,22 @@ builds:
- -w
- -linkmode external
- -extldflags -static
tags:
- netgo
flags:
- -x # log all commangs
buildmode:
pie
env:
- CGO_ENABLED=1
- >-
{{- if eq .Os "darwin" }}CC={{- end }}
{{- if eq .Os "windows" }}CC={{- end }}
{{- if eq .Os "linux" }}
{{- if eq .Arch "386"}}CC=musl-gcc{{- end }}
{{- if eq .Arch "amd64"}}CC=musl-gcc{{- end }}
{{- if eq .Arch "arm64"}}CC=aarch64-linux-musl-gcc{{- end }}
{{- end }}
CC=zig cc -target
{{- if eq .Arch "arm64"}} aarch64{{end -}}
{{- if eq .Arch "amd64"}} x86_64{{end -}}
{{- if eq .Arch "386"}} x86{{end -}}-
{{- if eq .Os "darwin" }}macos-none{{end -}}
{{- if eq .Os "windows" }}windows-gnu{{end -}}
{{- if eq .Os "linux" }}linux-musl{{- end }}
dockers:
# AMD64
- image_templates:
Expand Down

0 comments on commit 6207b4b

Please sign in to comment.