QProcess cleanup #596
Workflow file for this run
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 And Test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
BuildTest: | |
name: ${{ matrix.name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Linux_GCC | |
flavor: Debug | |
runner: ubuntu-22.04 | |
generator: Ninja | |
cc: gcc | |
cxx: g++ | |
- name: Linux_LLVM | |
flavor: Debug | |
runner: ubuntu-22.04 | |
generator: Ninja | |
cc: clang | |
cxx: clang++ | |
- name: Linux_Release | |
flavor: Release | |
runner: ubuntu-20.04 | |
generator: Ninja | |
cc: gcc | |
cxx: g++ | |
publish: true | |
- name: MacOS_GCC | |
flavor: Debug | |
runner: macos-11 | |
generator: Ninja | |
cc: gcc-10 | |
cxx: g++-10 | |
- name: MacOS_Release | |
flavor: Release | |
runner: macos-12 | |
generator: Ninja | |
cc: clang | |
cxx: clang++ | |
publish: true | |
# Qt 5.15 only supports MinGW 8.11. The `windows-latest` and `windows-2022` | |
# images bundle only 11.2. For now, we must use the older image `windows-2019`. | |
- name: Windows_MingGW | |
flavor: Debug | |
runner: windows-2022 | |
generator: MinGW Makefiles | |
qtver: 5.15.2 | |
qtdir: mingw81_64 | |
qtstr: windows desktop win64_mingw81 | |
cc: gcc | |
cxx: g++ | |
ctest_exe_args: -tap | |
- name: Windows_Release | |
flavor: Release | |
runner: windows-2022 | |
generator: Visual Studio 17 2022 | |
qtver: 5.15.2 | |
qtdir: msvc2019_64 | |
qtstr: windows desktop win64_msvc2019_64 | |
ctest_exe_args: -tap | |
publish: true | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- uses: actions/checkout@v2 | |
# | |
# Setup and Configuration | |
# | |
- name: Linux - Setup | |
if: ${{ startsWith(matrix.runner, 'ubuntu') }} | |
run: | | |
sudo add-apt-repository -y ppa:neovim-ppa/stable | |
sudo apt-get install -y neovim ninja-build libqt5svg5 libqt5svg5-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools | |
sudo apt-get update -y | |
- name: MacOS - Setup | |
if: ${{ startsWith(matrix.runner, 'macos') }} | |
run: | | |
brew install neovim | |
brew ls --formula | grep -wq ninja || brew install ninja | |
brew ls --formula | grep -wq qt5 || brew install qt5 | |
brew ls --formula | grep -wq msgpack || brew install msgpack | |
brew link qt5 --force | |
- name: Windows - Setup | |
if: ${{ startsWith(matrix.runner, 'windows') }} | |
env: | |
QT_DIR: ${{ github.workspace }}\${{ matrix.qtver }}\${{ matrix.qtdir }} | |
run: | | |
New-Item -Path .\build -Name "build" -ItemType "directory" | |
Invoke-WebRequest https://github.com/neovim/neovim/releases/download/stable/nvim-win64.zip -OutFile nvim-win64.zip | |
Expand-Archive -Path nvim-win64.zip -DestinationPath .\build\ | |
Add-Content -Path $env:GITHUB_PATH -Value ${{ github.workspace }}\build\nvim-win64\bin\ | |
Add-Content -Path $env:GITHUB_ENV -Value "CMAKE_PREFIX_PATH=$env:QT_DIR;$env:QT_DIR\lib\cmake" | |
Add-Content -Path $env:GITHUB_PATH -Value "${{ env.qt_dir }}" | |
Add-Content -Path $env:GITHUB_PATH -Value "${{ env.qt_dir }}\bin" | |
- name: Qt Cache Restore | |
if: ${{ matrix.qtver }} | |
id: cache-qt | |
uses: actions/cache@v2 | |
with: | |
path: ${{ matrix.qtver }}\${{ matrix.qtdir }} | |
key: qt-${{ runner.os }}-${{ matrix.qtver }}-${{ matrix.qtdir }} | |
- name: Qt Cache Install | |
if: ${{ matrix.qtver && steps.cache-qt.outputs.cache-hit != 'true' }} | |
run: | | |
pip install aqtinstall | |
python -m aqt install ${{ matrix.qtver }} ${{ matrix.qtstr }} | |
# | |
# Build and Test | |
# | |
- name: Neovim Version | |
run: nvim --version | |
- name: Configure | |
env: | |
CMAKE_BUILD_TYPE: ${{ matrix.flavor }} | |
CMAKE_GENERATOR: ${{ matrix.generator }} | |
run: > | |
cmake -B ./build | |
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install | |
-DCMAKE_C_COMPILER=${{ matrix.cc }} | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} | |
-DENABLE_TESTS=ON | |
-DCTEST_EXE_ARGS=${{ matrix.ctest_exe_args }} | |
- name: Build | |
run: cmake --build ${{ github.workspace }}/build | |
- name: Test | |
uses: GabrielBB/xvfb-action@v1 # Required by Linux, no X11 $DISPLAY | |
with: | |
working-directory: ${{ github.workspace }}/build | |
run: ctest -VV --timeout 120 --output-on-failure -C ${{ matrix.flavor }} | |
# | |
# Deploy Release Binaries | |
# | |
- name: Linux - Publish | |
if: ${{ matrix.publish && startsWith(matrix.runner, 'ubuntu') }} | |
env: | |
ARCH: x86_64 | |
run: | | |
cmake --build ./build --target install | |
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" | |
chmod a+x linuxdeployqt-continuous-x86_64.AppImage | |
./linuxdeployqt-continuous-x86_64.AppImage ./install/share/applications/nvim-qt.desktop -appimage -qmake=/usr/lib/qt5/bin/qmake | |
- name: MacOS - Publish | |
if: ${{ matrix.publish && startsWith(matrix.runner, 'macos') }} | |
run: | | |
macdeployqt ./build/bin/nvim-qt.app -dmg | |
mv ./build/bin/nvim-qt.dmg neovim-qt.dmg | |
- name: Windows - Publish | |
if: ${{ matrix.publish && startsWith(matrix.runner, 'windows') }} | |
run: | | |
cmake --build ./build --target install | |
Push-Location ${{ github.workspace }}/build | |
cpack --verbose -G WIX | |
Pop-Location | |
Compress-Archive -Path ./install -DestinationPath neovim-qt.zip | |
Move-Item -Path ./build/neovim-qt-installer.msi -Destination neovim-qt-installer.msi | |
- name: Upload Artifacts | |
if: ${{ matrix.publish }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.name }} | |
if-no-files-found: ignore | |
path: | | |
Neovim-Qt-*-x86_64.AppImage | |
neovim-qt.dmg | |
neovim-qt-installer.msi | |
neovim-qt.zip |