more #19
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest] | |
include: | |
- os: windows-latest | |
vcpkgCommitId: '9edb1b8e590cc086563301d735cae4b6e732d2d2' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- uses: lukka/get-cmake@latest | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v11 | |
id: runvcpkg | |
with: | |
vcpkgDirectory: 'D:\\a\\txlogger\\txlogger\\vcpkg' | |
vcpkgGitCommitId: '${{ matrix.vcpkgCommitId }}' | |
runVcpkgInstall: true | |
vcpkgJsonGlob: '*D:\\a\\txlogger\\txlogger\\vcpkg\\vcpkg.json' | |
- name: Prints output of run-vcpkg's action | |
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}'" | |
- name: Set up MinGW | |
uses: egor-tensin/setup-mingw@v2 | |
with: | |
platform: x64 | |
- name: Install Fyne CLI | |
run: go install fyne.io/fyne/v2/cmd/fyne@develop | |
- name: Install dependencies | |
run: go get . | |
- name: Build | |
env: | |
PKG_CONFIG_PATH: "D:\\a\\txlogger\\txlogger\\vcpkg\\packages\\libusb_x86-windows\\lib\\pkgconfig" | |
CGO_CFLAGS: "-ID:\\a\\txlogger\\txlogger\\vcpkg\\packages\\libusb_x86-windows\\include\\libusb-1.0" | |
GOARCH: 386 | |
GOOS: windows | |
CGO_ENABLED: 1 | |
run: fyne package --release | |