ARM builds, hopefully working
This commit is contained in:
		
							parent
							
								
									6a0dd08375
								
							
						
					
					
						commit
						fa8a7ce43e
					
				
					 3 changed files with 45 additions and 19 deletions
				
			
		|  | @ -2,13 +2,32 @@ before: | ||||||
|   hooks: |   hooks: | ||||||
|     - go mod download |     - go mod download | ||||||
| builds: | builds: | ||||||
|   - binary: ntfy |   - | ||||||
|  |     id: ntfy | ||||||
|  |     binary: ntfy | ||||||
|     env: |     env: | ||||||
|       - CGO_ENABLED=1 # required for go-sqlite3 |       - CGO_ENABLED=1 # required for go-sqlite3 | ||||||
|     goos: |     goos: [linux] | ||||||
|       - linux |     goarch: [amd64] | ||||||
|     goarch: |   - | ||||||
|       - amd64 |     id: ntfy_arm67 | ||||||
|  |     binary: ntfy | ||||||
|  |     env: | ||||||
|  |       - CGO_ENABLED=1 # required for go-sqlite3 | ||||||
|  |       - CC=arm-linux-gnueabi-gcc # apt install gcc-arm-linux-gnueabi | ||||||
|  |     goos: [linux] | ||||||
|  |     goarch: [arm] | ||||||
|  |     goarm: | ||||||
|  |       - 6 | ||||||
|  |       - 7 | ||||||
|  |   - | ||||||
|  |     id: ntfy_arm64 | ||||||
|  |     binary: ntfy | ||||||
|  |     env: | ||||||
|  |       - CGO_ENABLED=1 # required for go-sqlite3 | ||||||
|  |       - CC=aarch64-linux-gnu-gcc # apt install gcc-aarch64-linux-gnu | ||||||
|  |     goos: [linux] | ||||||
|  |     goarch: [arm64] | ||||||
| nfpms: | nfpms: | ||||||
|   - |   - | ||||||
|     package_name: ntfy |     package_name: ntfy | ||||||
|  | @ -54,6 +73,8 @@ dockers: | ||||||
|   - dockerfile: Dockerfile |   - dockerfile: Dockerfile | ||||||
|     ids: |     ids: | ||||||
|       - ntfy |       - ntfy | ||||||
|  |     goos: linux | ||||||
|  |     goarch: amd64 | ||||||
|     image_templates: |     image_templates: | ||||||
|       - "binwiederhier/ntfy:latest" |       - "binwiederhier/ntfy:latest" | ||||||
|       - "binwiederhier/ntfy:{{ .Tag }}" |       - "binwiederhier/ntfy:{{ .Tag }}" | ||||||
|  |  | ||||||
							
								
								
									
										22
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										22
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -61,6 +61,7 @@ coverage-html: | ||||||
| coverage-upload: | coverage-upload: | ||||||
| 	cd build/coverage && (curl -s https://codecov.io/bash | bash) | 	cd build/coverage && (curl -s https://codecov.io/bash | bash) | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| # Lint/formatting targets
 | # Lint/formatting targets
 | ||||||
| 
 | 
 | ||||||
| fmt: | fmt: | ||||||
|  | @ -84,13 +85,18 @@ staticcheck: .PHONY | ||||||
| 	PATH="$(PWD)/build/staticcheck:$(PATH)" staticcheck ./... | 	PATH="$(PWD)/build/staticcheck:$(PATH)" staticcheck ./... | ||||||
| 	rm -rf build/staticcheck | 	rm -rf build/staticcheck | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| # Building targets
 | # Building targets
 | ||||||
| 
 | 
 | ||||||
| build: .PHONY | build-deps: .PHONY | ||||||
| 	goreleaser build --rm-dist | 	which arm-linux-gnueabi-gcc || { echo "ERROR: ARMv6/v7 cross compiler not installed. On Ubuntu, run: apt install gcc-arm-linux-gnueabi"; exit 1; } | ||||||
|  | 	which aarch64-linux-gnu-gcc || { echo "ERROR: ARM64 cross compiler not installed. On Ubuntu, run: apt install gcc-aarch64-linux-gnu"; exit 1; } | ||||||
| 
 | 
 | ||||||
| build-snapshot: | build: build-deps | ||||||
| 	goreleaser build --snapshot --rm-dist | 	goreleaser build --rm-dist --debug | ||||||
|  | 
 | ||||||
|  | build-snapshot: build-deps | ||||||
|  | 	goreleaser build --snapshot --rm-dist --debug | ||||||
| 
 | 
 | ||||||
| build-simple: clean | build-simple: clean | ||||||
| 	mkdir -p dist/ntfy_linux_amd64 | 	mkdir -p dist/ntfy_linux_amd64 | ||||||
|  | @ -106,11 +112,11 @@ clean: .PHONY | ||||||
| 
 | 
 | ||||||
| # Releasing targets
 | # Releasing targets
 | ||||||
| 
 | 
 | ||||||
| release: | release: build-deps | ||||||
| 	goreleaser release --rm-dist | 	goreleaser release --rm-dist --debug | ||||||
| 
 | 
 | ||||||
| release-snapshot: | release-snapshot: build-deps | ||||||
| 	goreleaser release --snapshot --skip-publish --rm-dist | 	goreleaser release --snapshot --skip-publish --rm-dist --debug | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # Installing targets
 | # Installing targets
 | ||||||
|  |  | ||||||
							
								
								
									
										11
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								README.md
									
										
									
									
									
								
							|  | @ -136,14 +136,13 @@ sudo apt install ntfy | ||||||
| 
 | 
 | ||||||
| **Debian/Ubuntu** (*manual install*)**:** | **Debian/Ubuntu** (*manual install*)**:** | ||||||
| ```bash | ```bash | ||||||
| sudo apt install tmux | wget https://github.com/binwiederhier/ntfy/releases/download/v1.4.4/ntfy_1.4.4_amd64.deb | ||||||
| wget https://github.com/binwiederhier/ntfy/releases/download/v1.4.3/ntfy_1.3.0_amd64.deb | dpkg -i ntfy_1.4.4_amd64.deb | ||||||
| dpkg -i ntfy_1.4.3_amd64.deb |  | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| **Fedora/RHEL/CentOS:** | **Fedora/RHEL/CentOS:** | ||||||
| ```bash | ```bash | ||||||
| rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v1.4.3/ntfy_1.3.0_amd64.rpm | rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v1.4.4/ntfy_1.4.4_amd64.rpm | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| **Docker:** | **Docker:** | ||||||
|  | @ -158,8 +157,8 @@ go get -u heckel.io/ntfy | ||||||
| 
 | 
 | ||||||
| **Manual install** (*any x86_64-based Linux*)**:** | **Manual install** (*any x86_64-based Linux*)**:** | ||||||
| ```bash | ```bash | ||||||
| wget https://github.com/binwiederhier/ntfy/releases/download/v1.4.3/ntfy_1.3.0_linux_x86_64.tar.gz | wget https://github.com/binwiederhier/ntfy/releases/download/v1.4.4/ntfy_1.4.4_linux_x86_64.tar.gz | ||||||
| sudo tar -C /usr/bin -zxf ntfy_1.4.3_linux_x86_64.tar.gz ntfy | sudo tar -C /usr/bin -zxf ntfy_1.4.4_linux_x86_64.tar.gz ntfy | ||||||
| ./ntfy | ./ntfy | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue