Optimize 2023 Day 22 #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '~1.21.4' | |
- name: Test | |
# Only checking that the benchmarks pass, so set a short benchtime | |
run: go test -v ./... && go test -v -bench=. -benchtime=10ms ./... | |
- name: Build | |
run: go build -v . && file aoc | |
- name: Run | |
run: ./aoc -h && ./aoc -e | |
- name: Test (32 bit) | |
run: GOARCH=386 go test -v ./... && GOARCH=386 go test -v -bench=. -benchtime=10ms ./... | |
- name: Build (32 bit) | |
run: GOARCH=386 go build -v . && file aoc | |
- name: Run (32 bit) | |
run: ./aoc -h && ./aoc -e | |
- name: Build without solutions | |
run: rm -r ./internal/aoc* ./internal/util && go generate ./... && go build . && ./aoc -h |