Skip to content

Build

Build #33

Workflow file for this run

name: Build
on:
workflow_dispatch
jobs:
build:
name: Build
strategy:
matrix:
os: [windows-latest]
arch: [amd64, x86]
charset: [unicode]
include:
- os: windows-latest
arch: x86
charset: ansi
runs-on: ${{matrix.os}}
defaults:
run:
shell: cmd
steps:
- name: Upgrade msys2/mingw32
if: matrix.arch == 'x86'
uses: msys2/setup-msys2@v2
with:
msystem: mingw32
release: false
update: true
install: git mingw-w64-i686-toolchain
- name: Upgrade msys2/mingw64
if: matrix.arch == 'amd64'
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
release: false
update: true
install: mingw-w64-x86_64-toolchain
- name: Print environment
if: failure()
run: |
echo ----------------------------------------------------
set
echo ----------------------------------------------------
dir /OG %SystemDrive%\
echo ----------------------------------------------------
dir /s /b c:\msys64\*.exe
echo ----------------------------------------------------
dir /s /b D:\
echo ----------------------------------------------------
echo -- 1 && %SystemDrive%\msys64\mingw32\bin\gcc.exe -v
echo -- 2 && %SystemDrive%\msys64\mingw64\bin\gcc.exe -v
echo -- 3 && %SystemDrive%\mingw32\bin\gcc.exe -v
echo -- 4 && %SystemDrive%\mingw64\bin\gcc.exe -v
echo -- 5 && gcc.exe -v
echo ----------------------------------------------------
echo --1 && where msys2.exe
echo --2 && where msys2.cmd
echo --3 && where gcc.exe
echo ====================================================
py -0p
echo ----------------------------------------------------
py -3 -V
py -3 -m pip list
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build
run: |
_build.bat mingw release ${{matrix.arch}} ${{matrix.charset}}
- name: Print packages
run: |
dir /s /b /a-d packages
- name: Upload
if: success()
uses: actions/upload-artifact@v4
with:
name: package-${{matrix.arch}}-${{matrix.charset}}
path: packages/Release-mingw-${{matrix.arch}}-${{matrix.charset}}/*
retention-days: 7
# if: success() && github.ref == 'refs/heads/master'
- name: Upload curl
uses: actions/upload-artifact@v4
with:
name: curl-${{matrix.arch}}
path: packages/Release-mingw-${{matrix.arch}}-curl/*
retention-days: 7
# if: success() && github.ref == 'refs/heads/master'
if: success() && matrix.charset == 'unicode'
package:
name: Package
needs: build
runs-on: windows-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: package-*
merge-multiple: true
- name: Upload final package
uses: actions/upload-artifact@v4
with:
name: NScurl
path: artifacts/*
retention-days: 7
# if: success() && github.ref == 'refs/heads/master'
- name: NSIS example (x86-unicode)
shell: cmd
run: makensis.exe /DPLUGIN_DIR=..\..\Plugins\x86-unicode artifacts\Examples\NScurl\NScurl-Test.nsi
- name: NSIS example (x86-ansi)
shell: cmd
run: makensis.exe /DPLUGIN_DIR=..\..\Plugins\x86-ansi /DANSI artifacts\Examples\NScurl\NScurl-Test.nsi
- name: NSIS example (amd64-unicode)
shell: cmd
run: makensis.exe /DPLUGIN_DIR=..\..\Plugins\amd64-unicode /DAMD64 artifacts\Examples\NScurl\NScurl-Test.nsi
- name: Upload NSIS examples
uses: actions/upload-artifact@v4
with:
name: NScurl-Tests
path: artifacts/Examples/NScurl/NScurl-Test-*.exe
retention-days: 7
# if: success() && github.ref == 'refs/heads/master'