-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (64 loc) · 1.9 KB
/
windows-msys-64bit-gcc-ucrt-msvcrt-golang-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Windows Msys2 64bit (cygwin,msvcrt,ucrt) gcc golang build and test
on: [push]
jobs:
windows-build-and-test-golang:
runs-on: ${{ matrix.os }}
strategy:
matrix:
OS: ["windows-2022"]
CC: ["gcc"]
ENVIRONMENT: ["UCRT64", "MINGW64"] # https://www.msys2.org/docs/environments/
go-version: ["1.22.x"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Msys2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.ENVIRONMENT }}
install: >-
base-devel
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-pkg-config
mingw-w64-x86_64-gcc
mingw-w64-ucrt-x86_64-gcc
mingw-w64-x86_64-go
mingw-w64-ucrt-x86_64-go
make
git
gcc
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Gather runtime environment
shell: msys2 {0}
run: |
echo ${{ matrix.ENVIRONMENT }}
uname -a
bash --version
${{ matrix.CC }} -v
go version
- name: Install golang dependencies
shell: msys2 {0}
run: |
export HIGHCTIDH_PORTABLE=1
export CGO_ENABLED=1
go get -v ./...
- name: Build golang
shell: msys2 {0}
run: |
export HIGHCTIDH_PORTABLE=1
export CGO_ENABLED=1
export GOEXPERIMENT=cgocheck2
export GODEBUG=cgocheck=1
go build -v ./...
- name: Golang test
shell: msys2 {0}
run: |
export HIGHCTIDH_PORTABLE=1
export CGO_ENABLED=1
export GOEXPERIMENT=cgocheck2
export GODEBUG=cgocheck=1
export CGO_LDFLAGS="-Wl,--no-as-needed -Wl,-allow-multiple-definition"
go test -v ./...