Skip to content

Commit

Permalink
Add GitHub CI Windows x64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholastay committed Sep 30, 2023
1 parent ee6df82 commit a32e1be
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ortlinde Go build

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
- name: Install system build dependencies
run: sudo apt-get install -y binutils-mingw-w64-x86-64
- name: Generate Windows resource COFF
run: ./buildresource.sh
- name: Install Go dependencies
run: go get .
- name: Build for Windows x64
run: go build -v -o ortlinde.exe
env:
GOOS: windows
GOARCH: amd64
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ortlinde.exe
path: ortlinde.exe
5 changes: 4 additions & 1 deletion buildresource.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@

set -xe

windres -i ortlinde.rc -O coff -o ortlinde.syso
WINDRES=windres
# (on linux crosscompile)
command -v x86_64-w64-mingw32-windres >/dev/null && WINDRES=x86_64-w64-mingw32-windres
$WINDRES -i ortlinde.rc -O coff -o ortlinde.syso
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/nicholastay/ortlinde

go 1.21.1

require golang.org/x/sys v0.12.0 // indirect
require golang.org/x/sys v0.12.0

0 comments on commit a32e1be

Please sign in to comment.