@@ -14,39 +14,71 @@ jobs:
1414 strategy :
1515 fail-fast : false
1616 matrix :
17- os-artifact : [ [ubuntu-latest, linux], [windows-latest, windows], [macos-latest, macos] ]
17+ os-artifact : [ [ubuntu-latest, linux], [windows-latest, windows-gnu ], [macos-latest, macos] ]
1818 steps :
1919 - uses : actions/checkout@v2
2020 - name : Download workflow artifact
21- uses : dawidd6/action-download-artifact@v2.14 .0
21+ uses : dawidd6/action-download-artifact@v2.17 .0
2222 with :
2323 workflow : " build-libs.yml"
2424 path : ./libs/${{ matrix.os-artifact[1] }}
2525 github_token : ${{ secrets.GITHUB_TOKEN }}
2626 name : ${{ matrix.os-artifact[1] }}
27- - name : Set up Go
27+ - name : Download C header artifact
28+ 29+ with :
30+ workflow : " build-libs.yml"
31+ path : ./libs/${{ matrix.os-artifact[1] }}
32+ github_token : ${{ secrets.GITHUB_TOKEN }}
33+ name : C_header
34+ - name : Set up Go (default)
2835 uses : actions/setup-go@v2
2936 with :
3037 go-version : ^1.16
3138 - name : Set up Python
3239 uses : actions/setup-python@v2
3340 with :
3441 python-version : 3.9
42+ - uses : actions/setup-dotnet@v1
43+ with :
44+ dotnet-version : ' 6.0.x'
45+ - name : Set up Dotnet (docs)
46+ run : |
47+ dotnet tool install DefaultDocumentation.Console -g
48+ shell : pwsh
49+ # Set up Okapi-specific Go runtime. Includes setting GOLANG_LD_PATH env var.
50+ - name : Set up Go (Okapi)
51+ run : |
52+ go version
53+ go install golang.org/x/lint/golint@latest
54+ go install github.com/jstemmer/go-junit-report@latest
55+ go get github.com/posener/goreadme/cmd/goreadme
56+ python ../../devops/build_sdks.py --language=golang
57+ shell : pwsh
58+ working-directory : go/okapi
59+ env :
60+ GO111MODULE : on
3561 - name : Build and Test Golang
62+ run : |
63+ go build - name: Set up Go (Okapi)
3664 run : |
3765 go version
3866 go install golang.org/x/lint/golint@latest
3967 go install github.com/jstemmer/go-junit-report@latest
4068 python ../../devops/build_sdks.py
69+ shell : pwsh
70+ working-directory : go/okapi
71+ - name : Build and Test Golang
72+ run : |
4173 go build
4274 golint
43- go test -v | go-junit-report > test_output.xml
75+ go test -v -exec "env DYLD_LIBRARY_PATH=${{ env.GOLANG_LD_PATH }}" | go-junit-report > test_output.xml
4476 shell : pwsh
4577 working-directory : go/okapi
4678 env :
47- LD_LIBRARY_PATH : " ${{ github.workspace }}/go/okapi "
48- DYLD_FALLBACK_LIBRARY_PATH : " ${{ github.workspace }}/go/okapi "
49- DYLD_LIBRARY_PATH : " ${{ github.workspace }}/go/okapi "
79+ LD_LIBRARY_PATH : ${{ env.GOLANG_LD_PATH }}
80+ DYLD_FALLBACK_LIBRARY_PATH : ${{ env.GOLANG_LD_PATH }}
81+ DYLD_LIBRARY_PATH : ${{ env.GOLANG_LD_PATH }}
5082 API_GITHUB_TOKEN : ${{ secrets.API_GITHUB_TOKEN }}
5183 - name : Upload Unit Test Results - Golang
5284 if : always()
0 commit comments