Skip to content

Commit

Permalink
fix: trying another version of build configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Feb 10, 2024
1 parent bec1c43 commit c2a712f
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsqlite3-dev # Replace with the actual dependencies your project needs
sudo apt-get install -y libsqlite3-dev
- name: Install ARM64 cross-compilation tools
run: |
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
Expand Down
88 changes: 70 additions & 18 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,88 @@ changelog:
# Builder
# ---------------------------
builds:
- env:
- CGO_ENABLED=1
- GO111MODULE=on
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
- id: darwin-amd64
main: ./cmd/
binary: "alert_system"
binary: alert_system
goos:
- darwin
goarch:
- amd64
#- arm64
env:
- PKG_CONFIG_SYSROOT_DIR=/sysroot/macos/amd64
- PKG_CONFIG_PATH=/sysroot/macos/amd64/usr/local/lib/pkgconfig
- CC=o64-clang
- CXX=o64-clang++
flags:
- -mod=readonly
ldflags:
- -s -w -X main.version={{.Version}}

- id: linux-armhf
main: ./cmd/
binary: alert_system
goos:
#- darwin
- linux
goarch:
- arm
goarm:
- "6"
- "7"
goamd64:
- v2
- v3
mod_timestamp: "{{ .CommitTimestamp }}"
- 7
env:
- CC=arm-linux-gnueabihf-gcc
- CXX=arm-linux-gnueabihf-g++
- CGO_CFLAGS=--sysroot=/sysroot/linux/armhf
- CGO_LDFLAGS=--sysroot=/sysroot/linux/armhf
- PKG_CONFIG_SYSROOT_DIR=/sysroot/linux/armhf
- PKG_CONFIG_PATH=/sysroot/linux/armhf/opt/vc/lib/pkgconfig:/sysroot/linux/armhf/usr/lib/arm-linux-gnueabihf/pkgconfig:/sysroot/linux/armhf/usr/lib/pkgconfig:/sysroot/linux/armhf/usr/local/lib/pkgconfig
flags:
- -mod=readonly
ldflags:
- -s -w -X github.com/bitcoin-sv/{{ .ProjectName }}/cmd.Version={{ .Version }}
- -s -w -X main.version={{.Version}}

# - id: "amd64-build"
# main: ./cmd/
# env:
# - CGO_ENABLED=1
# - GO111MODULE=on
# goarch:
# - amd64
# goos:
# - linux
# mod_timestamp: "{{ .CommitTimestamp }}"
# ldflags:
# - -s -w -X github.com/bitcoin-sv/{{ .ProjectName }}/cmd.Version={{ .Version }}

# - id: "arm64-build"
# main: ./cmd/
# env:
# - CGO_ENABLED=1
# - GO111MODULE=on
# - CC=aarch64-linux-gnu-gcc
# - CXX=aarch64-linux-gnu-g++
# goarch:
# - arm64
# goos:
# - linux
# mod_timestamp: "{{ .CommitTimestamp }}"
# ldflags:
# - -s -w -X github.com/bitcoin-sv/{{ .ProjectName }}/cmd.Version={{ .Version }}

# ---------------------------
# Archives + Checksums
# ---------------------------
archives:
- wrap_in_directory: true
format: tar.gz
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}_{{ .Version }}'
- id: alert_system
builds:
- darwin-amd64
- linux-armhf
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format: zip
wrap_in_directory: true

#archives:
# - wrap_in_directory: true
# format: tar.gz
# name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}_{{ .Version }}'

checksum:
name_template: "{{ .ProjectName }}_checksums.txt"
Expand Down

0 comments on commit c2a712f

Please sign in to comment.