Link search results to their package and module (#489) #111
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: | |
| push: | |
| branches: [master] | |
| release: | |
| types: [published] | |
| env: | |
| BUNDLE_DIR: bundle | |
| jobs: | |
| build_server: | |
| name: Build server | |
| # Note that this must be kept in sync with the version of Ubuntu which the | |
| # Pursuit server is running, otherwise the server binary may fail to run | |
| # (the binary links against the runner's glibc, and a binary built against | |
| # a newer glibc than the server's will not start). | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: haskell-actions/setup@v2 | |
| with: | |
| enable-stack: true | |
| stack-version: "3.9.3" | |
| stack-no-global: true | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.stack | |
| key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml.lock') }}-${{ hashFiles('pursuit.cabal') }} | |
| - name: Build server code | |
| run: | | |
| stack --no-terminal --jobs=2 build --flag pursuit:-dev | |
| - name: Test server code | |
| run: | | |
| stack --no-terminal --jobs=2 test --flag pursuit:-dev --pedantic | |
| - name: Build server assets | |
| if: github.event_name == 'release' | |
| run: | | |
| mkdir ${{ env.BUNDLE_DIR }} | |
| cp $(stack path --dist-dir)/build/pursuit/pursuit ${{ env.BUNDLE_DIR }}/ | |
| cp LICENSE ${{ env.BUNDLE_DIR }}/ | |
| cp -r deploy/ ${{ env.BUNDLE_DIR }}/ | |
| tar czf pursuit.tar.gz -C ${{ env.BUNDLE_DIR }}/ . | |
| - name: Persist server assets | |
| uses: actions/upload-artifact@v4 | |
| if: github.event_name == 'release' | |
| with: | |
| name: pursuit.tar.gz | |
| path: pursuit.tar.gz | |
| retention-days: 1 | |
| release: | |
| name: Release | |
| runs-on: ubuntu-24.04 | |
| if: github.event_name == 'release' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| needs: | |
| - build_server | |
| steps: | |
| - name: Retrieve server assets | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pursuit.tar.gz | |
| - name: Upload assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| pursuit.tar.gz |