Skip to content

Update CI installation instructions #140

Update CI installation instructions

Update CI installation instructions #140

Workflow file for this run

{
"jobs": {
"build": {
"name": "Build on ${{ matrix.platform }} ${{ matrix.version }} with GHC ${{ matrix.ghc }}",
"runs-on": "${{ matrix.platform }}-${{ matrix.version }}",
"steps": [
{
"uses": "actions/checkout@v4"
},
{
"run": "mkdir artifact"
},
{
"id": "haskell",
"uses": "haskell-actions/setup@v2",
"with": {
"cabal-version": "3.10.2.1",
"ghc-version": "${{ matrix.ghc }}"
}
},
{
"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 }}-${{ matrix.version }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}",
"path": "${{ steps.haskell.outputs.cabal-store }}",
"restore-keys": "${{ matrix.platform }}-${{ matrix.version }}-${{ matrix.ghc }}-"
}
},
{
"run": "cabal build --only-download"
},
{
"run": "cabal build --only-dependencies"
},
{
"run": "cabal build"
},
{
"run": "cp $( cabal list-bin cabal-gild ) artifact"
},
{
"if": "matrix.platform == 'macos'",
"run": "codesign --sign - artifact/cabal-gild"
},
{
"uses": "actions/upload-artifact@v4",
"with": {
"name": "cabal-gild-${{ github.sha }}-${{ matrix.platform }}-${{ matrix.version }}-${{ matrix.ghc }}",
"path": "artifact"
}
},
{
"run": "cabal run -- cabal-gild-test-suite --randomize --strict"
},
{
"run": "artifact/cabal-gild --input cabal-gild.cabal --mode check"
}
],
"strategy": {
"matrix": {
"include": [
{
"ghc": "9.8.1",
"platform": "macos",
"version": 13
},
{
"ghc": "9.8.1",
"platform": "macos",
"version": 14
},
{
"ghc": "9.4.8",
"platform": "ubuntu",
"version": 22.04
},
{
"ghc": "9.6.4",
"platform": "ubuntu",
"version": 22.04
},
{
"ghc": "9.8.1",
"platform": "ubuntu",
"version": 22.04
},
{
"extension": ".exe",
"ghc": "9.8.1",
"platform": "windows",
"version": 2022
}
]
}
}
},
"cabal": {
"name": "Cabal",
"runs-on": "ubuntu-22.04",
"steps": [
{
"uses": "actions/checkout@v4"
},
{
"run": "cabal 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@v15",
"with": {
"version": "0.7.4.0"
}
}
]
},
"release": {
"env": {
"PREFIX": "cabal-gild-${{ github.event.release.tag_name }}"
},
"if": "github.event_name == 'release'",
"name": "Release",
"needs": "build",
"runs-on": "ubuntu-22.04",
"steps": [
{
"uses": "actions/download-artifact@v4"
},
{
"run": "cp cabal-gild-${{ github.sha }}-ubuntu-22.04-9.8.1/${{ env.PREFIX }}.tar.gz ."
},
{
"run": "chmod +x cabal-gild && tar --auto-compress --create --file ../${{ env.PREFIX }}-darwin-x64.tar.gz cabal-gild",
"working-directory": "cabal-gild-${{ github.sha }}-macos-13-9.8.1"
},
{
"run": "chmod +x cabal-gild && tar --auto-compress --create --file ../${{ env.PREFIX }}-darwin-arm64.tar.gz cabal-gild",
"working-directory": "cabal-gild-${{ github.sha }}-macos-14-9.8.1"
},
{
"run": "chmod +x cabal-gild && tar --auto-compress --create --file ../${{ env.PREFIX }}-linux-x64.tar.gz cabal-gild",
"working-directory": "cabal-gild-${{ github.sha }}-ubuntu-22.04-9.8.1"
},
{
"run": "chmod +x cabal-gild.exe && tar --auto-compress --create --file ../${{ env.PREFIX }}-win32-x64.tar.gz cabal-gild.exe",
"working-directory": "cabal-gild-${{ github.sha }}-windows-2022-9.8.1"
},
{
"uses": "softprops/action-gh-release@v1",
"with": {
"files": "${{ env.PREFIX }}*.tar.gz"
}
},
{
"run": "cabal upload --publish --username '${{ secrets.HACKAGE_USERNAME }}' --password '${{ secrets.HACKAGE_PASSWORD }}' ${{ env.PREFIX }}.tar.gz"
}
]
}
},
"name": "Workflow",
"on": {
"push": null,
"release": {
"types": [
"created"
]
},
"schedule": [
{
"cron": "0 0 * * 1"
}
]
}
}