docs: use new links to the blog and the portfolio page (#48) #346
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: Build CI | |
on: | |
push: | |
release: | |
types: [published] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
qt_version: [5.14.2] | |
platform: [ubuntu-16.04, macos-latest, 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 | |
exclude: | |
- platform: ubuntu-16.04 | |
arch: x86 | |
- platform: macos-latest | |
arch: x86 | |
fail-fast: false | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checking out sources | |
uses: actions/checkout@v2 | |
with: | |
submodules: "recursive" | |
- name: Install MSVC compiler | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
# 14.1 is for vs2017, 14.2 is vs2019, following the upstream vcpkg build from Qv2ray-deps repo | |
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/install-qt-action@v2 | |
with: | |
version: ${{ matrix.qt_version }} | |
arch: ${{ matrix.qtarch }} | |
mirror: "http://mirrors.ocf.berkeley.edu/qt/" | |
cached: ${{ steps.cache-qt.outputs.cache-hit }} | |
- name: Install Python 3.7 version | |
if: matrix.platform == 'windows-latest' | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.7" | |
architecture: ${{ matrix.arch }} | |
- name: Get the version | |
id: get_version | |
shell: bash | |
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | |
# Linux------------------------------------------ | |
- name: Linux - Install packages | |
if: matrix.platform == 'ubuntu-16.04' | |
shell: bash | |
env: | |
CC: /usr/bin/gcc-9 | |
CXX: /usr/bin/g++-9 | |
run: | | |
sudo apt install libgl-dev libx11-dev libxkbcommon-x11-dev ninja-build | |
- name: Linux - Build ecm | |
if: matrix.platform == 'ubuntu-16.04' | |
shell: bash | |
env: | |
CC: /usr/bin/gcc-9 | |
CXX: /usr/bin/g++-9 | |
run: | | |
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 -DCMAKE_INSTALL_PREFIX=/usr | |
cmake --build . --parallel $(nproc) | |
sudo cmake --build . --target install | |
- name: Linux - Build SyntaxHighlighting | |
if: matrix.platform == 'ubuntu-16.04' | |
shell: bash | |
env: | |
CC: /usr/bin/gcc-9 | |
CXX: /usr/bin/g++-9 | |
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 -DCMAKE_INSTALL_PREFIX=/usr | |
cmake --build . --parallel $(nproc) | |
sudo cmake --build . --target install | |
- name: Linux - ${{ matrix.qt_version }} - Generate Dependencies and Build | |
if: matrix.platform == 'ubuntu-16.04' | |
shell: bash | |
env: | |
CC: /usr/bin/gcc-9 | |
CXX: /usr/bin/g++-9 | |
run: | | |
mkdir build | |
cd build | |
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./AppDir/usr | |
cmake --build . --parallel $(nproc) | |
cmake --install . | |
- name: Linux - ${{ matrix.qt_version }} - Generating AppImage | |
if: matrix.platform == 'ubuntu-16.04' | |
shell: bash | |
env: | |
CC: /usr/bin/gcc-9 | |
CXX: /usr/bin/g++-9 | |
run: | | |
cd build | |
wget https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage | |
chmod +x ./linuxdeployqt-6-x86_64.AppImage | |
./linuxdeployqt-6-x86_64.AppImage --appimage-extract | |
cd AppDir | |
wget -c https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/AppRun-patched-x86_64 -O AppRun | |
chmod a+x AppRun | |
mkdir -p ./usr/{lib,optional}/ | |
wget -c https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/exec-x86_64.so -O ./usr/optional/exec.so | |
mkdir -p ./usr/optional/libstdc++/ | |
cp -fv /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./usr/optional/libstdc++/ | |
mkdir -p ./usr/optional/libgcc_s/ | |
cp -fv /lib/x86_64-linux-gnu/libgcc_s.so.1 ./usr/optional/libgcc_s/ | |
cp -fv /usr/lib/x86_64-linux-gnu/{libssl.so.1.1,libcrypto.so.1.1} ./usr/lib/ | |
cd .. | |
squashfs-root/AppRun AppDir/usr/share/applications/notepanda.desktop -appimage -no-strip -always-overwrite | |
mv ./Notepanda*.AppImage ./Notepanda.AppImage | |
- name: Linux - ${{ matrix.qt_version }} - Uploading artifact | |
if: matrix.platform == 'ubuntu-16.04' | |
uses: actions/upload-artifact@master | |
with: | |
name: Notepanda-${{ github.sha }}.Linux-${{ matrix.arch }}.qt${{ matrix.qt_version }}.AppImage | |
path: build/Notepanda.AppImage | |
- name: Linux - ${{ matrix.qt_version }} - Upload binaries to release | |
uses: svenstaro/upload-release-action@v1-release | |
if: github.event_name == 'release' && matrix.platform == 'ubuntu-16.04' && matrix.qt_version == '5.14.2' | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/Notepanda.AppImage | |
asset_name: Notepanda.${{ steps.get_version.outputs.VERSION }}.Linux-${{ matrix.arch }}.AppImage | |
tag: ${{ github.ref }} | |
overwrite: true | |
# 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 . --parallel $(nproc) | |
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 . --parallel $(nproc) | |
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 -DCMAKE_INSTALL_PREFIX=Release -DKF5SyntaxHighlighting_DIR="C:/Program Files (x86)/ECM/lib/cmake/KF5SyntaxHighlighting" | |
cmake --build . --parallel $(nproc) | |
cmake --install . | |
cd Release | |
windeployqt notepanda.exe --no-translations | |
- name: Win - ${{ matrix.arch }} - ${{ matrix.qt_version }} - Create 7z Release | |
if: matrix.platform == 'windows-latest' | |
uses: DuckSoft/create-7z-action@v1.0 | |
with: | |
pathSource: ./build/Release | |
pathTarget: ./release.7z | |
- name: Win - ${{ matrix.arch }} - ${{ matrix.qt_version }} - Uploading artifact | |
if: matrix.platform == 'windows-latest' | |
uses: actions/upload-artifact@master | |
with: | |
name: Notepanda-${{ github.sha }}.Windows-${{ matrix.arch }}.qt${{ matrix.qt_version }}.7z | |
path: release.7z | |
- name: Win - ${{ matrix.arch }} - ${{ matrix.qt_version }} - Upload binaries to release | |
uses: svenstaro/upload-release-action@v1-release | |
if: github.event_name == 'release' && matrix.platform == 'windows-latest' && matrix.qt_version == '5.14.2' | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: release.7z | |
asset_name: Notepanda.${{ steps.get_version.outputs.VERSION }}.Windows-${{ matrix.arch }}.7z | |
tag: ${{ github.ref }} | |
overwrite: true | |
# MacOS --------------------------------------------------------- | |
- name: MacOS - Build ecm | |
if: matrix.platform == 'macos-latest' | |
shell: bash | |
run: | | |
brew install ninja | |
cd src/3rdparty/extra-cmake-modules | |
mkdir build | |
cd build | |
cmake .. -GNinja -DBUILD_HTML_DOCS=OFF -DBUILD_MAN_DOCS=OFF -DBUILD_QTHELP_DOCS=OFF -DBUILD_TESTING=OFF | |
cmake --build . | |
cmake --build . --target install | |
- name: MacOS - Build syntax highlight | |
if: matrix.platform == 'macos-latest' | |
run: | | |
cd src/3rdparty/syntax-highlighting | |
mkdir build | |
cd build | |
cmake .. -GNinja -DBUILD_HTML_DOCS=OFF -DBUILD_MAN_DOCS=OFF -DBUILD_QTHELP_DOCS=OFF -DBUILD_TESTING=OFF | |
cmake --build . | |
sudo cmake --build . --target install | |
- name: macOS - ${{ matrix.qt_version }} - Generate Dependencies and Build | |
if: matrix.platform == 'macos-latest' | |
run: | | |
mkdir build | |
cd build | |
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DDS_STORE_SCRIPT=ON | |
cmake --build . | |
sudo cmake --install . | |
macdeployqt notepanda.app -dmg | |
- name: macOS - ${{ matrix.qt_version }} - Uploading Artifact | |
if: matrix.platform == 'macos-latest' | |
uses: actions/upload-artifact@master | |
with: | |
name: Notepanda-${{ github.sha }}.macOS-${{ matrix.arch }}.qt${{ matrix.qt_version }}.dmg | |
path: build/notepanda.dmg | |
- name: macOS - ${{ matrix.qt_version }} - Upload binaries to release | |
uses: svenstaro/upload-release-action@v1-release | |
if: github.event_name == 'release' && matrix.platform == 'macos-latest' && matrix.qt_version == '5.14.2' | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/notepanda.dmg | |
asset_name: Notepanda-${{ steps.get_version.outputs.VERSION }}.macOS-${{ matrix.arch }}.dmg | |
tag: ${{ github.ref }} | |
overwrite: true | |
# END |