diff --git a/.github/workflows/build-cmake-test.yml b/.github/workflows/build-cmake-test.yml new file mode 100644 index 000000000..2a8fb82cf --- /dev/null +++ b/.github/workflows/build-cmake-test.yml @@ -0,0 +1,101 @@ +--- +name: Build CMake Test + +on: + push: + branches: + - master + pull_request: + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04] + qt-version: [default] + build-system: [cmake] + fail-fast: false + + steps: + - uses: actions/checkout@v2.3.4 + with: + submodules: true + + - name: Cache Qt + id: cache-qt + uses: actions/cache@v2.1.4 + with: + path: ../Qt + key: ${{ runner.os }}-QtCache-${{ matrix.qt-version }}-20210109 + + # LINUX + - name: Install p7zip (Ubuntu) + if: startsWith(matrix.os, 'ubuntu') + run: sudo apt-get update && sudo apt-get -y install p7zip-full + + - name: Install Qt (Default version) + uses: jurplel/install-qt-action@v2 + if: ${{ matrix.qt-version == 'default' }} + with: + aqtversion: '==1.1.1' + cached: ${{ steps.cache-qt.outputs.cache-hit }} + extra: --external 7z + + - name: Install Qt (Specific version) + uses: jurplel/install-qt-action@v2 + if: ${{ matrix.qt-version != 'default' }} + with: + aqtversion: '==1.1.1' + cached: ${{ steps.cache-qt.outputs.cache-hit }} + extra: --external 7z + version: ${{ matrix.qt-version }} + + + # LINUX + - name: Install dependencies (Ubuntu) + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get -y install \ + cmake \ + virtualenv \ + rapidjson-dev \ + libssl-dev \ + libboost-dev \ + libxcb-randr0-dev \ + libboost-system-dev \ + libboost-filesystem-dev \ + libpulse-dev \ + libxkbcommon-x11-0 \ + libgstreamer-plugins-base1.0-0 \ + build-essential \ + libgl1-mesa-dev \ + libxcb-icccm4 \ + libxcb-image0 \ + libxcb-keysyms1 \ + libxcb-render-util0 \ + libxcb-xinerama0 + + - name: Build with CMake (Ubuntu) + if: startsWith(matrix.os, 'ubuntu') && matrix.build-system == 'cmake' + run: | + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=appdir/usr/ -DCMAKE_BUILD_TYPE=Release .. + make -j8 + shell: bash + + - name: Package (Ubuntu) + if: startsWith(matrix.os, 'ubuntu') + run: | + cd build + sh ./../.CI/CreateAppImage.sh + shell: bash + + - name: Upload artifact (Ubuntu) + if: startsWith(matrix.os, 'ubuntu') + uses: actions/upload-artifact@v2.2.2 + with: + name: Chatterino-x86_64-${{ matrix.qt-version }}-${{ matrix.build-system }}.AppImage + path: build/Chatterino-x86_64.AppImage