Skip to content

Commit

Permalink
Added ARMv6 build target to Makefile and nightly builds (cf. uhppoted…
Browse files Browse the repository at this point in the history
  • Loading branch information
twystd committed Dec 1, 2024
1 parent 0951fa9 commit 9b53e47
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,9 @@ jobs:
with:
path: dist/development/arm7/uhppote-cli
name: uhppote-cli_arm7-nightly

- name: Upload ARM6 artifact
uses: actions/upload-artifact@v4
with:
path: dist/development/arm6/uhppote-cli
name: uhppote-cli_arm6-nightly
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Added
1. ARMv6 build target (for Pi ZeroW).


### Updated
1. Added (optional) auto-send interval to _set-listener_ command.
2. Included auto-send interval (if not zero) in response from _get-listener_ command.
Expand Down
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,14 @@ build-all: build test vet lint
mkdir -p dist/$(DIST)/linux
mkdir -p dist/$(DIST)/arm
mkdir -p dist/$(DIST)/arm7
mkdir -p dist/$(DIST)/arm6
mkdir -p dist/$(DIST)/darwin-x64
mkdir -p dist/$(DIST)/darwin-arm64
mkdir -p dist/$(DIST)/windows
env GOOS=linux GOARCH=amd64 GOWORK=off go build -trimpath -o dist/$(DIST)/linux ./...
env GOOS=linux GOARCH=arm64 GOWORK=off go build -trimpath -o dist/$(DIST)/arm ./...
env GOOS=linux GOARCH=arm GOARM=7 GOWORK=off go build -trimpath -o dist/$(DIST)/arm7 ./...
env GOOS=linux GOARCH=arm GOARM=6 GOWORK=off go build -trimpath -o dist/$(DIST)/arm6 ./...
env GOOS=darwin GOARCH=amd64 GOWORK=off go build -trimpath -o dist/$(DIST)/darwin-x64 ./...
env GOOS=darwin GOARCH=arm64 GOWORK=off go build -trimpath -o dist/$(DIST)/darwin-arm64 ./...
env GOOS=windows GOARCH=amd64 GOWORK=off go build -trimpath -o dist/$(DIST)/windows ./...
Expand All @@ -80,6 +82,7 @@ release: update-release build-all
tar --directory=dist/$(DIST)/linux --exclude=".DS_Store" -cvzf dist/$(DIST)-linux-x64.tar.gz .
tar --directory=dist/$(DIST)/arm --exclude=".DS_Store" -cvzf dist/$(DIST)-arm-x64.tar.gz .
tar --directory=dist/$(DIST)/arm7 --exclude=".DS_Store" -cvzf dist/$(DIST)-arm7.tar.gz .
tar --directory=dist/$(DIST)/arm6 --exclude=".DS_Store" -cvzf dist/$(DIST)-arm6.tar.gz .
tar --directory=dist/$(DIST)/darwin-x64 --exclude=".DS_Store" -cvzf dist/$(DIST)-darwin-x64.tar.gz .
tar --directory=dist/$(DIST)/darwin-arm64 --exclude=".DS_Store" -cvzf dist/$(DIST)-darwin-arm64.tar.gz .
cd dist/$(DIST)/windows && zip --recurse-paths ../../$(DIST)-windows-x64.zip . -x ".DS_Store"
Expand All @@ -88,6 +91,7 @@ publish: release
echo "Releasing version $(VERSION)"
gh release create "$(VERSION)" "./dist/$(DIST)-arm-x64.tar.gz" \
"./dist/$(DIST)-arm7.tar.gz" \
"./dist/$(DIST)-arm6.tar.gz" \
"./dist/$(DIST)-darwin-arm64.tar.gz" \
"./dist/$(DIST)-darwin-x64.tar.gz" \
"./dist/$(DIST)-linux-x64.tar.gz" \
Expand Down Expand Up @@ -129,14 +133,11 @@ version: build
$(CLI) version

# DEVICE COMMANDS

get-devices: build
$(CLI) $(DEBUG) get-devices

get-device: build
$(CLI) $(DEBUG) get-device $(SERIALNO)
# $(CLI) get-device 303986753
# $(CLI) get-device 405419896

set-address: build
$(CLI) $(DEBUG) set-address $(SERIALNO) $(DEVICEIP) '255.255.255.0' '0.0.0.0'
Expand Down Expand Up @@ -184,7 +185,7 @@ get-card: build
$(CLI) $(DEBUG) get-card $(SERIALNO) $(CARD)

put-card: build
$(CLI) $(DEBUG) put-card $(SERIALNO) $(CARD) 2023-01-01 2023-12-31 1,3,4:29 7531 --card-format any
$(CLI) $(DEBUG) put-card $(SERIALNO) $(CARD) 2024-01-01 2024-12-31 1,3,4:29 7531 --card-format any

delete-card: build
$(CLI) $(DEBUG) delete-card $(SERIALNO) $(CARD)
Expand Down Expand Up @@ -240,7 +241,6 @@ get-event: build
$(CLI) get-event $(SERIALNO) next:5
$(CLI) get-event $(SERIALNO)
$(CLI) get-event $(SERIALNO) 17263
# $(CLI) get-event 201020304 100

get-event-index: build
$(CLI) $(DEBUG) get-event-index $(SERIALNO)
Expand All @@ -253,7 +253,6 @@ open-door: build

set-pc-control: build
$(CLI) $(DEBUG) set-pc-control $(SERIALNO) true
# $(CLI) $(DEBUG) set-pc-control 423187757 true

set-interlock: build
$(CLI) $(DEBUG) set-interlock $(SERIALNO) '$(INTERLOCK)'
Expand Down Expand Up @@ -287,7 +286,6 @@ revoke-all: build

get-acl: build
$(CLI) get-acl
# $(CLI) $(DEBUG) --config ../runtime/simulation/$(SERIALNO).conf get-acl ../runtime/simulation/uhppote-cli.acl

get-acl-with-pin: build
$(CLI) get-acl
Expand Down
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- [ ] CLI is waiting for CR on error
- [ ] JSON formatted output for e.g. get-status
- https://blog.kellybrazil.com/2021/12/03/tips-on-adding-json-output-to-your-cli-app/
- [ ] getopt
- https://dotat.at/@/2024-11-06-getopt.html

## TODO

Expand Down

0 comments on commit 9b53e47

Please sign in to comment.