Skip to content

Merge pull request #143 from yuk7/dependabot/go_modules/src/golang.or… #142

Merge pull request #143 from yuk7/dependabot/go_modules/src/golang.or…

Merge pull request #143 from yuk7/dependabot/go_modules/src/golang.or… #142

Workflow file for this run

name: Continuous Integration
on:
push:
paths:
- 'src/**'
- 'res/**'
- 'build.bat'
- '.github/workflows/**'
pull_request:
paths:
- 'src/**'
- 'res/**'
- 'build.bat'
- '.github/workflows/**'
jobs:
compile-wsldl-windows:
name: Compile wsldl
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
$short_sha = $env:GITHUB_SHA.SubString(0, 7)
$Env:GO_BUILD_OPTS = "-ldflags `"-X github.com/yuk7/wsldl/version.version=CI-${short_sha}`""
.\build.bat all
Compress-Archive -Path .\out\icons\* -DestinationPath .\out\icons.zip
- uses: actions/upload-artifact@v2
with:
name: Build results-Windows
path: |
out/wsldl.exe
out/icons.zip
if-no-files-found: error
compile-wsldl-windows-arm64:
name: Compile wsldl ARM64
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
$Env:PATH = "${Env:USERPROFILE}\go\bin;${Env:PATH}"
$short_sha = $env:GITHUB_SHA.SubString(0, 7)
$Env:GO_BUILD_OPTS = "-ldflags `"-X github.com/yuk7/wsldl/version.version=CI-${short_sha}`""
$Env:GOARCH="arm64"
.\build.bat all
Compress-Archive -Path .\out\icons\* -DestinationPath .\out\icons.zip
- uses: actions/upload-artifact@v2
with:
name: Build results-Windows-ARM64
path: |
out/wsldl.exe
out/icons.zip
if-no-files-found: error
compile-wsldl-linux:
name: Cross-compile wsldl from Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest
export PATH=$PATH:~/go/bin
cd src
goversioninfo
env GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/yuk7/wsldl/version.version=CI-Cross-${GITHUB_SHA:0:7}"
- uses: actions/upload-artifact@v2
with:
name: Build results-Linux
path: |
src/wsldl.exe
if-no-files-found: error