Skip to content

Update native loading of root programs #837

Update native loading of root programs

Update native loading of root programs #837

# Copyright Contributors to the L3AF Project.
# SPDX-License-Identifier: Apache-2.0
#
# For documentation on the github environment, see
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
#
# For documentation on the syntax of this file, see
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: CI Windows build
on:
pull_request: {}
push:
branches:
- main
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
steps:
- name: Setup Go 1.18.6
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753
with:
go-version: '1.18.6'
- name: Harden Runner
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Set up git env
run: |
git config --global core.autocrlf false
$gopath = (go env GOPATH)
echo "GOPATH=$gopath" >> $env:GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Format
run: |
go install golang.org/x/tools/cmd/goimports@latest
$goimp = (Join-path -Path (go env GOPATH) -ChildPath "\bin\goimports")
$res = (&$goimp -l .) -replace "$_"
if ($res -ne "") {
echo "Unformatted source code:"
echo $res
exit 1
}
- name: Vet
run: |
go vet -tags WINDOWS ./...
- name: Test
run: |
go test -tags WINDOWS ./...
- uses: dominikh/staticcheck-action@ba605356b4b29a60e87ab9404b712f3461e566dc
with:
version: "2022.1.1"
install-go: false
build-tags: WINDOWS
- name: Build
env:
GOPATH: ${{env.GOPATH}}
run: |
cmake -B build
cmake --build build