From 89ac09bbe15deec6646766cb9ec93b3434d167dc Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 16 Mar 2024 16:26:40 +0800 Subject: [PATCH] Add cabal.project workflow --- .github/workflows/cabal.project.yaml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/cabal.project.yaml diff --git a/.github/workflows/cabal.project.yaml b/.github/workflows/cabal.project.yaml new file mode 100644 index 0000000..0fff3e0 --- /dev/null +++ b/.github/workflows/cabal.project.yaml @@ -0,0 +1,39 @@ +name: Test cabal.project files + +on: + push: + branches: + - master + tags: + - 'v*' + pull_request: + branches: + - master + schedule: + - cron: '0 2 * * *' + +jobs: + build: + name: Build binary + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macOS-latest, macOS-11, windows-latest, ubuntu-latest] + ghc: ["8.10.7", "9.0.2", "9.2.8", "9.4.8"] + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: 'true' + + - name: Run build + run: | + env + ghcup --version + ghcup run -i --cabal latest -- cabal update + ghcup run -i --cabal latest --ghc ${GHC_VER} -- cabal build --project-file=cabal.ghc${GHC_VER//./}.project + env: + GHC_VER: ${{ matrix.ghc }} + shell: bash +