chore: pin third-party GitHub Actions to commit SHAs #137
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: Run CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths-ignore: | |
| - '**.md' # Do not need to run CI for markdown changes. | |
| pull_request: | |
| branches: [ main ] | |
| paths-ignore: | |
| - '**.md' | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - resolver: lts-18.28 | |
| ghc-version: 8.10.7 | |
| - resolver: lts-19.33 | |
| ghc-version: 9.0.2 | |
| - resolver: lts-20.26 | |
| ghc-version: 9.2.5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install PCRE development libraries | |
| run: sudo apt-get update && sudo apt-get install -y libpcre3-dev | |
| - uses: ./.github/actions/setup-cache | |
| with: | |
| ghc-version: ${{ matrix.ghc-version }} | |
| - uses: ./.github/actions/ci | |
| with: | |
| resolver: ${{ matrix.resolver }} | |
| ghc-version: ${{ matrix.ghc-version }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| build-macosx: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - resolver: lts-18.28 | |
| ghc-version: 8.10.7 | |
| use-llvm: 'true' | |
| - resolver: lts-19.33 | |
| ghc-version: 9.0.2 | |
| use-llvm: 'true' | |
| - resolver: lts-20.26 | |
| ghc-version: 9.2.5 | |
| use-llvm: 'false' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup C_INCLUDE_PATH | |
| run: | | |
| brew install pcre | |
| echo "C_INCLUDE_PATH=$(find /opt/homebrew/Cellar/pcre -name 'pcre.h' -exec dirname {} \;):$(xcrun --show-sdk-path)/usr/include/ffi" >> $GITHUB_ENV | |
| - name: Add LLVM to path | |
| if: ${{ matrix.use-llvm == 'true' }} | |
| run: | | |
| brew install llvm@14 | |
| echo "PATH=/opt/homebrew/opt/llvm@14/bin:$PATH" >> $GITHUB_ENV | |
| - uses: ./.github/actions/setup-cache | |
| with: | |
| ghc-version: ${{ matrix.ghc-version }} | |
| - uses: ./.github/actions/ci | |
| with: | |
| resolver: ${{ matrix.resolver }} | |
| ghc-version: ${{ matrix.ghc-version }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| quality-checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-cache | |
| with: | |
| ghc-version: '9.4.7' | |
| - uses: haskell-actions/setup@f9150cb1d140e9a9271700670baa38991e6fa25c # v2 | |
| with: | |
| ghc-version: '9.4.7' | |
| - name: 'Set up HLint' | |
| uses: haskell-actions/hlint-setup@fe9cd1cd1af94a23900c06738e73f6ddb092966a # v2 | |
| with: | |
| version: 3.5 | |
| - name: 'Run HLint' | |
| uses: haskell-actions/hlint-run@eaca4cfbf4a69f4eb875df38b6bc3e1657020378 # v2 | |
| with: | |
| fail-on: warning | |
| - uses: haskell-actions/run-fourmolu@5a9f41fa092841e52e6c57dde5600e586fa766a4 # v10 | |
| with: | |
| version: "0.10.1.0" | |
| pattern: | | |
| src | |
| test | |
| - name: Install hpack | |
| run: cabal install --global hpack-0.35.1 | |
| - name: Verify the generated .cabal file is up-to-date | |
| run: | | |
| hpack | |
| if [ $(git status --porcelain | wc -l) -gt 0 ]; then | |
| echo "hpack resulted in modified files. please run hpack locally and commit those changes" | |
| echo "" | |
| echo "showing the results of `git status`" | |
| git status | |
| exit -1 | |
| fi |