tentative v0.4 #67
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 Release | |
on: | |
push: | |
branches: | |
- "master" | |
- "continuous-integration" | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- "master" | |
- "continuous-integration" | |
defaults: | |
run: | |
shell: cmd | |
env: | |
BUILD_TYPE: Release | |
SOURCE_DIR: ${{ github.workspace }} | |
QT_VERSION: 6.5.3 | |
ARTIFACT: CS3MapEdit_Win64 | |
ARCH: win64_msvc2019_64 | |
HOST: windows | |
VSARCH: x64 | |
jobs: | |
build: | |
runs-on: windows-2019 | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
- name: (2) Get all tags for correct version determination | |
working-directory: ${{ github.workspace }} | |
run: | | |
git fetch --all --tags -f | |
- name: Download JOM | |
uses: suisei-cn/actions-download-file@v1.4.0 | |
with: | |
url: http://download.qt.io/official_releases/jom/jom.zip | |
target: ${{ runner.temp }}\ | |
- name: Unzip JOM | |
working-directory: ${{ runner.temp }} | |
run: | | |
7z x jom.zip -ojom | |
- name: Download zlib | |
uses: suisei-cn/actions-download-file@v1.4.0 | |
with: | |
url: https://cfrankb.com/files/libs/zlib13.zip | |
target: ${{ runner.temp }}\ | |
- name: Unzip zlib | |
working-directory: ${{ runner.temp }} | |
run: | | |
7z x zlib13.zip -ozlib | |
dir /w zlib | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ env.QT_VERSION }} | |
host: ${{ env.HOST }} | |
target: desktop | |
arch: ${{ env.ARCH }} | |
dir: ${{ runner.temp }} | |
#modules: qtcharts qt3d | |
setup-python: false | |
- name: Create build directory | |
run: mkdir ${{ runner.temp }}\build | |
- name: Set up Visual Studio shell | |
uses: egor-tensin/vs-shell@v2 | |
with: | |
arch: ${{ env.VSARCH }} | |
- name: compile zlib | |
working-directory: ${{ runner.temp }} | |
run: | | |
cd zlib\\zlib-1.3 | |
dir /w | |
nmake /f win32/Makefile.msc | |
dir /w | |
mkdir ${{ runner.temp }}\build\libs | |
mkdir ${{ runner.temp }}\build\headers | |
copy zlib.lib ${{ runner.temp }}\build\libs | |
copy zlib.h ${{ runner.temp }}\build\headers | |
copy zconf.h ${{ runner.temp }}\build\headers | |
mkdir ${{ env.SOURCE_DIR }}\libs | |
copy zlib.lib ${{ env.SOURCE_DIR }}\libs | |
- name: Build | |
working-directory: ${{ runner.temp }}\build | |
run: | | |
qmake -r ${{ env.SOURCE_DIR }}\\mapedit.pro | |
cat Makefile.Release | |
${{ runner.temp }}\jom\jom -j2 | |
dir /s | |
cd release | |
windeployqt --qmldir ${{ env.SOURCE_DIR }}\\src mapedit.exe --pdb --release --no-compiler-runtime --no-translations | |
copy C:\Windows\System32\concrt140.dll . | |
copy C:\Windows\System32\vccorlib140.dll . | |
copy C:\Windows\System32\msvcp140.dll . | |
copy C:\Windows\System32\vcruntime140.dll . | |
del *.obj | |
del *.cpp | |
del *.h | |
del *.res | |
dir /s | |
- name: Compress to zip file | |
working-directory: ${{ runner.temp }}\build\release | |
run: | | |
7z a ${{ env.SOURCE_DIR }}\${{ env.ARTIFACT }}.zip * | |
dir /s ${{ env.SOURCE_DIR }} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
LICENSE | |
*.zip | |
- name: Save build artifact | |
uses: actions/upload-artifact@master | |
with: | |
name: ${{ env.ARTIFACT }} | |
path: ${{ runner.temp }}\build\release |