Add few libraries to Windows' Qt build #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows Forms builds | |
on: push | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build-x86_64: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: dlang-community/setup-dlang@v1 | |
with: | |
compiler: ldc-1.33.0 | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install -y libz-dev elfutils clang lld 7zip | |
- name: Set-up Windows cross-compilation | |
run: | | |
mkdir -p $HOME/.ldc/ | |
cat << EOF | tee $HOME/.ldc/ldc2.conf | |
"x86_64-.*-windows-msvc": | |
{ | |
// default switches injected before all explicit command-line switches | |
switches = [ | |
"-defaultlib=phobos2-ldc,druntime-ldc", | |
]; | |
// default switches appended after all explicit command-line switches | |
post-switches = [ | |
"-I$HOME/ldc2-1.33.0-windows-x64/import", | |
]; | |
// default directories to be searched for libraries when linking | |
lib-dirs = [ | |
"$HOME/ldc2-1.33.0-windows-x64/lib", | |
]; | |
}; | |
EOF | |
curl -LO https://github.com/ldc-developers/ldc/releases/download/v1.33.0/ldc2-1.33.0-windows-x64.7z | |
7z x ./ldc2-1.33.0-windows-x64.7z -o$HOME | |
- name: Write version file | |
run: echo 'module version_string; enum versionStr = "Sideloader automated build, branch ${{ github.ref_name }}, commit ${{ github.sha }}";' > source/version_string.d | |
- name: Build | |
run: dub build -b release-debug -c windows-winforms --compiler=ldc2 --arch x86_64-windows-msvc | |
- name: Rename | |
run: | | |
mv "${{github.workspace}}/bin/sideloader.exe" "${{github.workspace}}/bin/sideloader-windows-x86_64.exe" | |
mv "${{github.workspace}}/bin/sideloader.pdb" "${{github.workspace}}/bin/sideloader-windows-x86_64.pdb" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: sideloader-windows-x86_64 | |
path: | | |
${{github.workspace}}/bin/sideloader-windows-x86_64.exe | |
${{github.workspace}}/bin/sideloader-windows-x86_64.pdb |