GH: Waku windows build configuration (#432)

* Update binutils for windows

* Create mingw-env action and move configuration there

* Use cc and cxx vars for gowaku

* Use go 1.20 for waku
This commit is contained in:
gusto 2023-09-22 09:31:31 +03:00 committed by GitHub
parent 2ceba073c0
commit 0eae715f8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

22
.github/actions/mingw-env/action.yml vendored Normal file
View File

@ -0,0 +1,22 @@
# Adapting https://github.com/microsoft/windows-rs/blob/master/.github/actions/fix-environment/action.yml
# for waku windows builds to use desired binutils version.
name: Fix environment
description: GitHub VMs aren't configured correctly
runs:
using: "composite"
steps:
- name: Update binutils (Windows)
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
pacboy: binutils
- name: Configure CC and CXX for GNU
shell: pwsh
run: |
"CC=x86_64-w64-mingw32-gcc" >> $env.GITHUB_ENV
"CXX=x86_64-w64-mingw32-g++" >> $env.GITHUB_ENV
- name: Configure environment
shell: pwsh
run: |
"C:\msys64\mingw64\bin" >> $env:GITHUB_PATH

View File

@ -44,7 +44,7 @@ jobs:
submodules: true
- uses: actions/setup-go@v3 # we need go to build go-waku
with:
go-version: '1.19'
go-version: '1.20'
# Setup Rust toolchain with GNU for Windows
- name: Setup Rust with GNU toolchain (Windows)
if: matrix.os == 'windows-latest'
@ -61,6 +61,10 @@ jobs:
profile: minimal
toolchain: stable
override: true
# Setup build environment (Windows)
- name: Setup build environment (Windows)
if: matrix.os == 'windows-latest'
uses: ./.github/actions/mingw-env
- uses: actions-rs/cargo@v1
with:
command: build