Skip to content

Commit

Permalink
#79: added govulncheck for automated vulnerability checks; upgraded b…
Browse files Browse the repository at this point in the history
…uild to go-1.20.1
  • Loading branch information
mlnoga committed Feb 27, 2023
1 parent 825a28f commit 9054ca9
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 84 deletions.
60 changes: 46 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,72 @@ jobs:
name: run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: install golang
uses: actions/setup-go@v3
with:
go-version: '1.19.3'
go-version: '1.20.1'

- name: install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest

- uses: actions/checkout@v3

- name: run vulnerability check
run: govulncheck ./...

- name: build
run: make cross-platform
- name: build Linux amd64
run: make nightlight_linux_amd64

- name: upload linux build
- name: test
run: make test

- name: upload Linux amd64 build
uses: actions/upload-artifact@v3
with:
name: dist
path: nightlight_linux_amd64

- name: upload osx build
- name: build Linux arm7 (Raspberry Pi 32-bit)
run: make nightlight_linux_arm7

- name: upload Linux arm7 (Raspberry Pi 32-bit) build
uses: actions/upload-artifact@v3
with:
name: dist
path: nightlight_darwin_amd64
path: nightlight_linux_arm7

- name: upload windows build
- name: build Linux arm64 (Raspberry Pi 64-bit)
run: make nightlight_linux_arm64

- name: upload Linux arm64 (Raspberry Pi 64-bit) build
uses: actions/upload-artifact@v3
with:
name: dist
path: nightlight_windows_amd64.exe
path: nightlight_linux_arm64

- name: upload raspi build
- name: build Darwin amd64 (MacOS Intel)
run: make nightlight_darwin_amd64

- name: upload Darwin amd64 (MacOS Intel) build
uses: actions/upload-artifact@v3
with:
name: dist
path: nightlight_linux_arm7
path: nightlight_darwin_amd64

- name: test
run: make test
- name: build Darwin arm64 (MacOS Apple Silicon)
run: make nightlight_darwin_arm64

- name: upload Darwin arm64 (MacOS Apple Silicon) build
uses: actions/upload-artifact@v3
with:
name: dist
path: nightlight_darwin_arm64

- name: build Windows amd64
run: make nightlight_windows_amd64

- name: upload windows build
uses: actions/upload-artifact@v3
with:
name: dist
path: nightlight_windows_amd64.exe
36 changes: 30 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,40 @@ jobs:
name: run
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: install golang
uses: actions/setup-go@v3
with:
go-version: '1.19.3'
go-version: '1.20.1'

- name: install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest

- name: checkout
uses: actions/checkout@v3

- name: run vulnerability check
run: govulncheck ./...

- name: build Linux amd64
run: make nightlight_linux_amd64

- name: test
run: make test

- name: build Linux arm7 (Raspberry Pi 32-bit)
run: make nightlight_linux_arm7

- name: build Linux arm64 (Raspberry Pi 64-bit)
run: make nightlight_linux_arm64

- name: build Darwin amd64 (MacOS Intel)
run: make nightlight_darwin_amd64

- name: build Darwin arm64 (MacOS Apple Silicon)
run: make nightlight_darwin_arm64

- name: build
run: make cross-platform
- name: build Windows amd64
run: make nightlight_windows_amd64

- name: zip
run: |
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ web/blockly/%:
$(EXECUTABLE): $(SRCS) $(BLOCKLY) $(WEBSRCS)
$(GO) build -o $@ $(FLAGS) ./cmd/$(TARGET)

cross-platform: $(TARGET)_linux_amd64 $(TARGET)_darwin_amd64 $(TARGET)_windows_amd64.exe $(TARGET)_linux_arm7 $(TARGET)_linux_arm64
cross-platform: $(TARGET)_linux_amd64 $(TARGET)_linux_arm7 $(TARGET)_linux_arm64 $(TARGET)_darwin_amd64 $(TARGET)_darwin_arm64 $(TARGET)_windows_amd64.exe

$(TARGET)_%_amd64: $(SRCS) $(BLOCKLY)
GOOS=$* GOARCH=amd64 $(GO) build -o $@ $(FLAGS) ./cmd/$(TARGET)
Expand All @@ -54,6 +54,9 @@ $(TARGET)_%_arm64: $(SRCS) $(BLOCKLY)
test:
$(GO) test -v ./cmd/$(TARGET) ./internal

vulncheck:
govulncheck ./...

clean:
rm -f $(EXECUTABLE) $(TARGET)_*_amd64* $(TARGET)_*_amd64.exe

Expand Down
63 changes: 0 additions & 63 deletions internal/unused/bbox.go

This file was deleted.

0 comments on commit 9054ca9

Please sign in to comment.