name: ci / build-windows on: workflow_call: inputs: branch: required: true type: string jobs: build: runs-on: windows-latest defaults: run: shell: msys2 {0} env: MSYSTEM: MINGW64 steps: - name: Checkout code uses: actions/checkout@v3 - name: Setup MSYS2 uses: msys2/setup-msys2@v2 with: update: true install: >- git base-devel mingw-w64-x86_64-toolchain make cmake upx mingw-w64-x86_64-rust mingw-w64-x86_64-postgresql mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-zlib mingw-w64-x86_64-openssl mingw-w64-x86_64-python mingw-w64-x86_64-cmake mingw-w64-x86_64-llvm mingw-w64-x86_64-clang - name: Add UPX to PATH run: | echo "/usr/bin:$PATH" >> $GITHUB_PATH echo "/mingw64/bin:$PATH" >> $GITHUB_PATH echo "/usr/lib:$PATH" >> $GITHUB_PATH echo "/mingw64/lib:$PATH" >> $GITHUB_PATH - name: Verify dependencies run: | which upx gcc g++ make cmake cargo rustc python - name: Creating tmp directory run: mkdir -p tmp - name: Setup Nimble uses: nim-lang/setup-nimble-action@v1 with: nimble-version: '0.20.1' repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Add Nimble to MSYS2 PATH and run make update run: | # The setup-nimble-action installs to .nimble_runtime/bin but MSYS2 has its own PATH # Also need to add nim-dlls for OpenSSL DLLs (libcrypto, libssl) export NIMBLE_BIN="$(pwd)/.nimble_runtime/bin" export NIM_DLLS="$(pwd)/nim-dlls" echo "NIMBLE_BIN=$NIMBLE_BIN" >> $GITHUB_ENV echo "NIM_DLLS=$NIM_DLLS" >> $GITHUB_ENV export PATH="$NIMBLE_BIN:$NIM_DLLS:$HOME/.nimble/bin:$PATH" which nimble nimble -v make update - name: Clone vendors (for RLN) run: | export PATH="$NIMBLE_BIN:$NIM_DLLS:$HOME/.nimble/bin:$PATH" make vendors - name: Building wakunode2.exe run: | export PATH="$NIMBLE_BIN:$NIM_DLLS:$HOME/.nimble/bin:$PATH" make wakunode2 LOG_LEVEL=DEBUG V=3 -j8 - name: Building libwaku.dll run: | export PATH="$NIMBLE_BIN:$NIM_DLLS:$HOME/.nimble/bin:$PATH" make libwaku STATIC=0 LOG_LEVEL=DEBUG V=1 -j - name: Check Executable run: | if [ -f "./build/wakunode2.exe" ]; then echo "wakunode2.exe build successful" else echo "Build failed: wakunode2.exe not found" exit 1 fi if [ -f "./build/libwaku.dll" ]; then echo "libwaku.dll build successful" else echo "Build failed: libwaku.dll not found" exit 1 fi