Remove UPX (#55) #1040
This file contains 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
jobs: | |
build: | |
name: Build on ${{ matrix.platform }} | |
runs-on: ${{ matrix.platform }}-${{ matrix.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: mkdir artifact | |
- id: haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: 9.8 | |
- run: cabal sdist --output-dir artifact | |
- run: cabal configure --enable-optimization=2 --enable-tests --flags pedantic --jobs | |
- run: cat cabal.project.local | |
- run: cp cabal.project.local artifact | |
- run: cabal freeze | |
- run: cat cabal.project.freeze | |
- run: cp cabal.project.freeze artifact | |
- run: cabal outdated --v2-freeze-file cabal.project.freeze | |
- uses: actions/cache@v4 | |
with: | |
key: ${{ matrix.platform }}/${{ hashFiles('cabal.project.freeze') }} | |
path: ${{ steps.haskell.outputs.cabal-store }} | |
restore-keys: ${{ matrix.platform }}/ | |
- run: cabal build --only-download | |
- run: cabal build --only-dependencies | |
- run: cabal build | |
- run: cp $( cabal list-bin monadoc ) artifact | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: monadoc-${{ matrix.platform }}-${{ github.sha }} | |
path: artifact | |
- run: echo ::add-matcher::.github/hspec-problem-matcher.json | |
- run: cabal run -- monadoc-test-suite --randomize --strict | |
strategy: | |
matrix: | |
include: | |
- platform: macos | |
version: 14 | |
- platform: ubuntu | |
version: 22.04 | |
- platform: windows | |
version: 2022 | |
cabal: | |
name: Cabal | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: cabal check | |
deploy: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
name: Deploy | |
needs: docker | |
secrets: inherit | |
uses: ./.github/workflows/deploy.yaml | |
docker: | |
if: ${{ github.event_name != 'schedule' }} | |
name: Docker | |
needs: build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: monadoc-ubuntu-${{ github.sha }} | |
path: artifact | |
- run: cd artifact && tar xf monadoc-*.tar.gz | |
- run: mv artifact/monadoc-*/data artifact/monadoc docker | |
- run: chmod +x docker/monadoc | |
- id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
flavor: latest=false | |
images: ghcr.io/${{ github.repository }} | |
tags: type=sha,format=long | |
- uses: docker/login-action@v3 | |
with: | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
- uses: docker/build-push-action@v6 | |
with: | |
build-args: MONADOC_COMMIT_SHA=${{ github.sha }} | |
context: docker | |
labels: ${{ steps.meta.outputs.labels }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
fly: | |
name: Fly | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: superfly/flyctl-actions/setup-flyctl@fc53c09e1bc3be6f54706524e3b82c4f462f77be | |
- env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
FLY_APP_NAME: green-hill-3802 | |
run: flyctl config validate --app $FLY_APP_NAME | |
gild: | |
name: Gild | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: tfausak/cabal-gild-setup-action@v2 | |
with: | |
version: 1.5.0.1 | |
- run: cabal-gild --input monadoc.cabal --mode check | |
hlint: | |
name: HLint | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/hlint-setup@v2 | |
with: | |
version: 3.8 | |
- uses: haskell-actions/hlint-run@v2 | |
with: | |
fail-on: status | |
ormolu: | |
name: Ormolu | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/run-ormolu@v16 | |
with: | |
version: 0.7.7.0 | |
name: Workflow | |
on: | |
push: null | |
schedule: | |
- cron: 0 0 * * 1 |