Skip to content

Commit

Permalink
ci: static analysis and test build for multiple platforms
Browse files Browse the repository at this point in the history
- AMD64 Linux
- AMD64 MacOS
- AMD64 Windows
- ARM64 Linux
- ARM64 MacOS
- ARM64 Windows
  • Loading branch information
pilinux committed Aug 18, 2023
1 parent 3a01ab6 commit 0dd09b0
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,46 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Examine source code
run: go vet -v ./...
- name: Examine source code for Linux AMD
run: GOOS=linux GOARCH=amd64 go vet -v ./...

- name: Examine source code for MacOS AMD
run: GOOS=darwin GOARCH=amd64 go vet -v ./...

- name: Examine source code for Windows AMD
run: GOOS=windows GOARCH=amd64 go vet -v ./...

- name: Examine source code for Linux ARM
run: GOOS=linux GOARCH=arm64 go vet -v ./...

- name: Examine source code for MacOS ARM
run: GOOS=darwin GOARCH=arm64 go vet -v ./...

- name: Examine source code for Windows ARM
run: GOOS=windows GOARCH=arm64 go vet -v ./...

- name: Gosec security scanner
uses: securego/gosec@master
with:
args: -include=G102,G103,G104,G106,G107,G108,G109,G110,G111,G112,G113,G114,G201,G202,G203,G204,G205 ./...

- name: Build
run: go build -v ./...
- name: Build for Linux AMD
run: GOOS=linux GOARCH=amd64 go build -v ./...

- name: Build for MacOS AMD
run: GOOS=darwin GOARCH=amd64 go build -v ./...

- name: Build for Windows AMD
run: GOOS=windows GOARCH=amd64 go build -v ./...

- name: Build for Linux ARM
run: GOOS=linux GOARCH=arm64 go build -v ./...

- name: Build for MacOS ARM
run: GOOS=darwin GOARCH=arm64 go build -v ./...

- name: Build for Windows ARM
run: GOOS=windows GOARCH=arm64 go build -v ./...

- name: Test
if: github.event_name == 'push'
Expand Down

0 comments on commit 0dd09b0

Please sign in to comment.