Skip to content

Commit

Permalink
try to build on windows/latest
Browse files Browse the repository at this point in the history
Signed-off-by: Stephan Renatus <[email protected]>
  • Loading branch information
srenatus committed Feb 2, 2025
1 parent e09de8d commit 229c6e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:
variant_name: opa_no_ci
arch: arm64
- os: windows
run: ubuntu-22.04
targets: ci-go-ci-build-windows
run: windows-latest
targets: ci-build-windows
arch: amd64
- os: darwin
run: macos-13
Expand All @@ -75,7 +75,13 @@ jobs:
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ${{ steps.go_version.outputs.go_version }}
if: matrix.os == 'darwin'
if: matrix.os != 'linux'

- run: C:/msys64/usr/bin/pacman.exe -S --needed mingw-w64-x86_64-gcc --noconfirm
if: matrix.os == 'windows'
- shell: pwsh
run: echo "C:\msys64\mingw64\bin" >> $Env:GITHUB_PATH
if: matrix.os == 'windows'

- name: Download generated artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ release-dir:

.PHONY: generate
generate: wasm-lib-build
$(GO) generate
#$(GO) generate # TODO(sr): ifeq this

.PHONY: build
build: go-build
Expand Down Expand Up @@ -301,7 +301,6 @@ ci-build-darwin-arm64-static: ensure-release-dir
# that can install the `gcc-mingw-w64-x86-64` package via apt-get.
.PHONY: ci-build-windows
ci-build-windows: ensure-release-dir
build/ensure-windows-toolchain.sh
@$(MAKE) build GOOS=windows CC=x86_64-w64-mingw32-gcc
mv opa_windows_$(GOARCH) $(RELEASE_DIR)/opa_windows_$(GOARCH).exe
cd $(RELEASE_DIR)/ && shasum -a 256 opa_windows_$(GOARCH).exe > opa_windows_$(GOARCH).exe.sha256
Expand Down

0 comments on commit 229c6e3

Please sign in to comment.