Skip to content

.github/workflows: bump setup-go to v5 #35

.github/workflows: bump setup-go to v5

.github/workflows: bump setup-go to v5 #35

name: CI
on:
push:
branches: [ "main", "bindgen", "ci", "com_objects_v3" ]
pull_request:
# all PRs on all branches
concurrency:
# For PRs, later CI runs preempt previous ones. e.g. a force push on a PR
# cancels running CI jobs and starts all new ones.
#
# For non-PR pushes, concurrency.group needs to be unique for every distinct
# CI run we want to have happen. Use run_id, which in practice means all
# non-PR CI runs will be allowed to run without preempting each other.
group: ${{ github.workflow }}-$${{ github.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
goarch: [ "386", "amd64", "arm64" ]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install go-winres
run: go install github.com/tc-hib/go-winres@latest
- name: Set up build directory
run: |
mkdir -p .\bin
- name: Build Binaries
run: |
go build -v -o ./bin ./...
env:
GOARCH: ${{ matrix.goarch }}
- name: Build Test Binaries
run: |
go test -c -o ./bin ./...
env:
GOARCH: ${{ matrix.goarch }}
- name: Bind Resources to All Binaries
run: |
foreach ($file in Get-ChildItem .\bin\*.exe)
{
go-winres patch $file
}
- name: Test
if: ${{ matrix.goarch != 'arm64' }}
run: |
go test -o ./bin -v ./...
env:
GOARCH: ${{ matrix.goarch }}