docs: use new links to the blog and the portfolio page (#48) #96
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: CPack - NSIS | |
on: | |
push: | |
release: | |
types: [published] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
qt_version: [5.14.2] | |
platform: [windows-latest] | |
arch: [x86, x64] | |
include: | |
- platform: windows-latest | |
arch: x86 | |
qtarch: win32_msvc2017 | |
cmakearch: Win32 | |
- platform: windows-latest | |
arch: x64 | |
qtarch: win64_msvc2017_64 | |
cmakearch: x64 | |
fail-fast: false | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Get the version | |
id: get_version | |
shell: bash | |
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | |
- name: Checking out sources | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Install Python 3.7 version | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.7' | |
architecture: ${{ matrix.arch }} | |
# ========================================================================================================= | |
- name: Install MSVC compiler | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
toolset: 14.2 | |
arch: ${{ matrix.arch }} | |
- name: Cache Qt | |
id: cache-qt | |
uses: actions/cache@v1 | |
with: | |
path: ../Qt | |
key: QtCache-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.qt_version }} | |
- name: Installing Qt - ${{ matrix.arch }} | |
uses: jurplel/[email protected] | |
with: | |
version: ${{ matrix.qt_version }} | |
arch: ${{ matrix.qtarch }} | |
mirror: 'http://mirrors.ocf.berkeley.edu/qt/' | |
cached: ${{ steps.cache-qt.outputs.cache-hit }} | |
# Windows---------------------------------------------------------------------- | |
# - name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - Build preparation - Download Dependencies | |
# if: matrix.platform == 'windows-latest' | |
# run: | | |
# choco install -y ninja | |
- name: Setup Ninja | |
if: matrix.platform == 'windows-latest' | |
uses: ashutoshvarma/setup-ninja@master | |
with: | |
# ninja version to download. Default: 1.10.0 | |
version: 1.10.0 | |
- name: Win - Build ecm | |
if: matrix.platform == 'windows-latest' | |
env: | |
CC: cl.exe | |
CXX: cl.exe | |
run: | | |
set VCINSTALLDIR="C:\Program Files (x86)\Microsoft Visual Studio 16.0\VC" | |
cd src/3rdparty/extra-cmake-modules | |
mkdir build | |
cd build | |
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_HTML_DOCS=OFF -DBUILD_MAN_DOCS=OFF -DBUILD_QTHELP_DOCS=OFF -DBUILD_TESTING=OFF | |
cmake --build . | |
cmake --build . --target install | |
- name: Win - Build syntax highlight | |
if: matrix.platform == 'windows-latest' | |
env: | |
CC: cl.exe | |
CXX: cl.exe | |
run: | | |
cd src/3rdparty/syntax-highlighting | |
mkdir build | |
cd build | |
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_HTML_DOCS=OFF -DBUILD_MAN_DOCS=OFF -DBUILD_QTHELP_DOCS=OFF -DBUILD_TESTING=OFF | |
cmake --build . | |
cmake --build . --target install | |
- name: Windows - ${{ matrix.qt_version }} - Generate Dependencies and Build | |
if: matrix.platform == 'windows-latest' | |
env: | |
CC: cl.exe | |
CXX: cl.exe | |
run: | | |
mkdir build | |
cd build | |
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DKF5SyntaxHighlighting_DIR="C:/Program Files (x86)/ECM/lib/cmake/KF5SyntaxHighlighting" -DBUILD_NSIS=ON | |
cmake --build . --target package --parallel $(nproc) | |
- name: Windows - Get package name | |
shell: bash | |
id: get_package | |
run: | | |
echo ::set-output name=NAME::$(basename build/Notepanda-*.exe) | |
- name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - uploading artifact | |
uses: actions/upload-artifact@master | |
with: | |
name: ${{ steps.get_package.outputs.NAME }} | |
path: build/${{ steps.get_package.outputs.NAME }} | |
- name: Win-${{ matrix.arch }} - ${{ matrix.qt_version }} - Upload binaries to release | |
uses: svenstaro/upload-release-action@v1-release | |
if: github.event_name == 'release' | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/${{ steps.get_package.outputs.NAME }} | |
asset_name: Notepanda.${{ steps.get_version.outputs.VERSION }}.Windows-${{ matrix.arch }}.exe | |
tag: ${{ github.ref }} | |
overwrite: true |