Skip to content

Commit

Permalink
try other conditional env approach
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Feb 22, 2024
1 parent 0248ee8 commit 7de266f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
echo 'BUILD_TIME=$(date --iso-8601=seconds)' >> .release-env
echo 'VERSION=${{ github.ref_name }}' >> .release-env
echo 'COMMIT=${{ github.sha }}' >> .release-env
echo 'CGO_FLAGS="-O2 -D__BLST_PORTABLE__"' >> .release-env
echo 'CGO_ENABLED=1' >> .release-env
echo 'GITHUB_TOKEN=${{ secrets.FLOW_CLI_RELEASE }}' >> .release-env
- name: Build and Release
run: make release
29 changes: 16 additions & 13 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@ builds:
- amd64
- arm64
env:
- >-
{{- if eq .Os "darwin" }}
{{- if eq .Arch "amd64"}}CC=o64-clang CXX=o64-clang++{{- end }}
{{- if eq .Arch "arm64"}}CC=oa64-clang CXX=oa64-clang++{{- end }}
{{- end }}
{{ if eq .Os "linux" }}
{{- if eq .Arch "amd64" }}CC=x86_64-linux-gnu-gcc CXX=x86_64-linux-gnu-g++{{- end }}
{{- if eq .Arch "arm64" }}CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++{{- end }}
{{- end }}
{{- if eq .Os "windows" }}
{{- if eq .Arch "amd64" }}CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++{{- end }}
{{- if eq .Arch "arm64" }}CC=aarch64-w64-mingw32-gcc CXX=aarch64-w64-mingw32-g++{{- end }}
{{- end }}
- CGO_FLAGS="-O2 -D__BLST_PORTABLE__"
- CGO_ENABLED=1
- CC_darwin_amd64=o64-clang
- CXX_darwin_amd64=o64-clang+
- CC_darwin_arm64=oa64-clang
- CXX_darwin_arm64=oa64-clang++
- CC_linux_amd64=x86_64-linux-gnu-gcc
- CXX_linux_amd64=x86_64-linux-gnu-g++
- CC_linux_arm64=aarch64-linux-gnu-gcc
- CXX_linux_arm64=aarch64-linux-gnu-g++
- CC_windows_amd64=x86_64-w64-mingw32-gcc
- CXX_windows_amd64=x86_64-w64-mingw32-g++
- CC_windows_arm64=aarch64-w64-mingw32-gcc
- CXX_windows_arm64=aarch64-w64-mingw32-g++
- 'CC={{ index .Env (print "CC_" .Os "_" .Arch) }}'
- 'CXX={{ index .Env (print "CXX_" .Os "_" .Arch) }}'
flags:
- -mod=readonly
ldflags:
Expand Down

0 comments on commit 7de266f

Please sign in to comment.