Update Cabal dep #104
Workflow file for this run
This file contains hidden or 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: Tests | |
| # Trigger the workflow on push or pull request, but only for the main branch | |
| on: | |
| pull_request: | |
| push: | |
| branches: ["master"] | |
| jobs: | |
| generate-matrix: | |
| name: "Generate matrix from cabal" | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Extract the tested GHC versions | |
| id: set-matrix | |
| uses: kleidukos/get-tested@v0.1.7.1 | |
| with: | |
| cabal-file: hsqml.cabal | |
| ubuntu-version: latest | |
| version: 0.1.7.1 | |
| tests: | |
| name: ${{ matrix.ghc }} on ${{ matrix.os }} | |
| needs: generate-matrix | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} | |
| steps: | |
| - name: Checkout base repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Haskell | |
| id: setup-haskell | |
| uses: haskell-actions/setup@v2.8 | |
| with: | |
| ghc-version: ${{ matrix.ghc }} | |
| cabal-version: 3.10.3.0 | |
| - name: Configure | |
| run: cabal configure --enable-tests | |
| - name: Cache Cabal packages | |
| uses: actions/cache@v4.2.3 | |
| with: | |
| path: | | |
| ~/.cabal/packages | |
| ~/.cabal/store | |
| dist-newstyle | |
| key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }} | |
| restore-keys: | | |
| ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal- | |
| - name: Install Qt5 Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| qtdeclarative5-dev \ | |
| qml-module-qtquick-controls2 \ | |
| qml-module-qtquick-window2 \ | |
| qml-module-qtquick2 \ | |
| libqt5quick5 \ | |
| qt5-image-formats-plugins \ | |
| qtmultimedia5-dev \ | |
| qml-module-qtmultimedia \ | |
| qttools5-dev-tools \ | |
| qtbase5-dev | |
| - name: Build | |
| run: cabal build --enable-tests | |
| - name: Test | |
| run: | | |
| export QT_QPA_PLATFORM=offscreen | |
| cabal run hsqml-test1 --enable-tests |