Version 1.0.1.2 #136
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: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| release: | |
| types: | |
| - created | |
| jobs: | |
| meta: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - id: name | |
| run: "echo name=$( grep '^name: ' *.cabal | cut -d ' ' -f 2 ) >> $GITHUB_OUTPUT" | |
| - id: version | |
| run: "echo version=$( grep '^version:' *.cabal | cut -d ' ' -f 2 ) >> $GITHUB_OUTPUT" | |
| outputs: | |
| name: ${{ steps.name.outputs.name }} | |
| version: ${{ steps.version.outputs.version }} | |
| cabal: | |
| name: Cabal | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - run: cabal check | |
| gild: | |
| name: Gild | |
| needs: meta | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: tfausak/cabal-gild-setup-action@5aa7281b9e1d33818ed53230eef6f73dda3f89e1 # v2 | |
| - run: cabal-gild --input ${{ needs.meta.outputs.name }}.cabal --mode check | |
| hlint: | |
| name: HLint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: haskell-actions/hlint-setup@fe9cd1cd1af94a23900c06738e73f6ddb092966a # v2.4.10 | |
| - uses: haskell-actions/hlint-run@eaca4cfbf4a69f4eb875df38b6bc3e1657020378 # v2.4.10 | |
| with: | |
| fail-on: status | |
| ormolu: | |
| name: Ormolu | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: haskell-actions/run-ormolu@c5eec49879ee294be01c787bcbf7b5a373a37060 # v17 | |
| build: | |
| name: GHC ${{ matrix.ghc }} on ${{ matrix.os }} with PostgreSQL ${{ matrix.postgres }} | |
| needs: meta | |
| runs-on: ${{ matrix.os }}-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - run: mkdir artifact | |
| - uses: haskell/ghcup-setup@2860d0b41e2c5aa7d005bcbc2bd2506a09557ed8 # v1.2.2 | |
| with: | |
| ghc: ${{ matrix.ghc }} | |
| cabal: latest | |
| - run: ghc-pkg list | |
| - run: cabal sdist --output-dir artifact | |
| - run: echo DOCUMENTATION=${{ matrix.documentation && '--enable-documentation --haddock-for-hackage' || '' }} >> $GITHUB_ENV | |
| - run: cabal configure $DOCUMENTATION --enable-tests --flags=pedantic --jobs | |
| - run: cat cabal.project.local | |
| - run: cp cabal.project.local artifact | |
| - run: cabal update | |
| - run: cabal freeze | |
| - run: cat cabal.project.freeze | |
| - run: cp cabal.project.freeze artifact | |
| - run: cabal outdated --v2-freeze-file | |
| - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 | |
| with: | |
| key: ${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | |
| path: ~/.local/state/cabal | |
| restore-keys: ${{ matrix.os }}-${{ matrix.ghc }}- | |
| - run: cabal build --only-download | |
| - uses: ikalnytskyi/action-setup-postgres@c4dda34aae1c821e3a771b68b73b13af3198a7ee # v8 | |
| with: | |
| postgres-version: ${{ matrix.postgres }} | |
| - run: cabal build --only-dependencies | |
| - run: cabal build | |
| - if: ${{ env.DOCUMENTATION }} | |
| run: cp dist-newstyle/${{ needs.meta.outputs.name }}-${{ needs.meta.outputs.version }}-docs.tar.gz artifact | |
| - run: tar --create --file artifact.tar --verbose artifact | |
| - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: postgresql-simple-interval-${{ github.sha }}-${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.postgres }} | |
| path: artifact.tar | |
| - env: | |
| PGPASSWORD: postgres | |
| run: cabal run -- postgresql-simple-interval-test-suite --randomize | |
| strategy: | |
| matrix: | |
| include: | |
| - documentation: false | |
| ghc: '9.12' | |
| postgres: 17 | |
| os: macos | |
| - documentation: false | |
| ghc: '8.8' | |
| postgres: 17 | |
| os: ubuntu | |
| - documentation: false | |
| ghc: '8.10' | |
| postgres: 17 | |
| os: ubuntu | |
| - documentation: false | |
| ghc: '9.0' | |
| postgres: 17 | |
| os: ubuntu | |
| - documentation: false | |
| ghc: '9.2' | |
| postgres: 17 | |
| os: ubuntu | |
| - documentation: false | |
| ghc: '9.4' | |
| postgres: 17 | |
| os: ubuntu | |
| - documentation: false | |
| ghc: '9.6' | |
| postgres: 17 | |
| os: ubuntu | |
| - documentation: false | |
| ghc: '9.8' | |
| postgres: 17 | |
| os: ubuntu | |
| - documentation: false | |
| ghc: '9.10' | |
| postgres: 17 | |
| os: ubuntu | |
| - documentation: false | |
| ghc: '9.12' | |
| postgres: 14 | |
| os: ubuntu | |
| - documentation: false | |
| ghc: '9.12' | |
| postgres: 15 | |
| os: ubuntu | |
| - documentation: false | |
| ghc: '9.12' | |
| postgres: 16 | |
| os: ubuntu | |
| - documentation: true | |
| ghc: '9.12' | |
| postgres: 17 | |
| os: ubuntu | |
| - documentation: false | |
| ghc: '9.14' | |
| postgres: 17 | |
| os: ubuntu | |
| release: | |
| if: ${{ github.event_name == 'release' }} | |
| name: Release | |
| needs: | |
| - build | |
| - meta | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: postgresql-simple-interval-${{ github.sha }}-ubuntu-9.12-17 | |
| - run: tar --extract --file artifact.tar --verbose | |
| - uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 | |
| with: | |
| files: artifact/${{ needs.meta.outputs.name }}-${{ needs.meta.outputs.version }}.tar.gz | |
| - run: echo PUBLISH=${{ github.event_name == 'release' && '--publish' || '' }} >> $GITHUB_ENV | |
| - run: cabal upload $PUBLISH --token '${{ secrets.HACKAGE_TOKEN }}' artifact/${{ needs.meta.outputs.name }}-${{ needs.meta.outputs.version }}.tar.gz | |
| - run: cabal --http-transport=plain-http upload --documentation $PUBLISH --token '${{ secrets.HACKAGE_TOKEN }}' artifact/${{ needs.meta.outputs.name }}-${{ needs.meta.outputs.version }}-docs.tar.gz |