diff --git a/.github/workflows/dist-macos-latest.yml b/.github/workflows/dist-macos-latest.yml new file mode 100644 index 0000000..bd54ac3 --- /dev/null +++ b/.github/workflows/dist-macos-latest.yml @@ -0,0 +1,43 @@ +name: dist-macos-latest + +permissions: + contents: write + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +on: + workflow_dispatch: + pull_request: + +jobs: + build: + name: ${{ matrix.os }} / GHC ${{ matrix.ghc }} + runs-on: ${{ matrix.os }} + steps: + - run: brew install ghcup + - run: ghcup install ghc ${{ matrix.ghc }} --set + - run: ghcup install cabal latest + - run: echo "$HOME/.ghcup/bin" >> "$GITHUB_PATH" + - run: ghc --version + - run: cabal update + - run: cabal install --package-env=. --lib hspec + - uses: actions/checkout@v4 + - name: publish + run: | + dst=$RUNNER_OS-$ImageOS-$RUNNER_ARCH-ghc-${{ matrix.ghc }}.tar.gz + tar -czpf "$dst" ~/.ghcup ~/.local/state/cabal/store + gh release create nightly --prerelease || (git tag nightly -f && git push --tags -f) + gh release upload nightly "$dst" --clobber + # if: github.ref == 'refs/heads/main' + env: + GH_TOKEN: ${{ github.token }} + + strategy: + fail-fast: false + matrix: + os: + - macos-latest + ghc: + - 9.12.2 diff --git a/.github/workflows/dist-ubuntu-22.04.yml b/.github/workflows/dist-ubuntu-22.04.yml new file mode 100644 index 0000000..87f7828 --- /dev/null +++ b/.github/workflows/dist-ubuntu-22.04.yml @@ -0,0 +1,99 @@ +name: dist-ubuntu-22.04 + +permissions: + contents: write + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +on: + workflow_dispatch: + pull_request: + +jobs: + build: + name: ${{ matrix.os }} / GHC ${{ matrix.ghc }} + runs-on: ${{ matrix.os }} + steps: + - run: ghcup rm ghc 9.12.2 + - run: ghcup rm ghc 9.10.3 + - run: du -hs /usr/local/.ghcup + - run: ghcup list + - run: sudo apt-get install libncurses5 + - run: ghcup install ghc ${{ matrix.ghc }} --set + - run: ghc --version + - run: cabal update + - run: cabal install --package-env=. --lib hspec + - uses: actions/checkout@v4 + - name: publish + run: | + dst=$RUNNER_OS-$ImageOS-$RUNNER_ARCH-ghc-${{ matrix.ghc }}.tar.gz + tar -czpf "$dst" /usr/local/.ghcup ~/.local/state/cabal/store + gh release create nightly --prerelease || (git tag nightly -f && git push --tags -f) + gh release upload nightly "$dst" --clobber + # if: github.ref == 'refs/heads/main' + env: + GH_TOKEN: ${{ github.token }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-22.04 + ghc: + - 8.0.2 + - 8.2.2 + - 8.4.1 + - 8.4.2 + - 8.4.3 + - 8.4.4 + - 8.6.1 + - 8.6.2 + - 8.6.3 + - 8.6.4 + - 8.6.5 + - 8.8.1 + - 8.8.2 + - 8.8.3 + - 8.8.4 + - 8.10.1 + - 8.10.2 + - 8.10.3 + - 8.10.4 + - 8.10.5 + - 8.10.6 + - 8.10.7 + - 9.0.1 + - 9.0.2 + - 9.2.1 + - 9.2.2 + - 9.2.3 + - 9.2.4 + - 9.2.5 + - 9.2.6 + - 9.2.7 + - 9.2.8 + - 9.4.1 + - 9.4.2 + - 9.4.3 + - 9.4.4 + - 9.4.5 + - 9.4.6 + - 9.4.7 + - 9.4.8 + - 9.6.1 + - 9.6.2 + - 9.6.3 + - 9.6.4 + - 9.6.5 + - 9.6.6 + - 9.6.7 + - 9.8.1 + - 9.8.2 + - 9.8.4 + - 9.10.1 + - 9.10.2 + - 9.10.3 + - 9.12.1 + - 9.12.2 diff --git a/fast/action.yml b/fast/action.yml new file mode 100644 index 0000000..e6dbb56 --- /dev/null +++ b/fast/action.yml @@ -0,0 +1,26 @@ +name: Setup Haskell +author: Simon Hengel + +inputs: + ghc-version: + required: true + +runs: + using: composite + steps: + - shell: bash + run: echo "$HOME/.ghcup/bin" >> "$GITHUB_PATH" + if: runner.os == 'macOS' + - shell: bash + run: echo "ImageOS=$ImageOS" >> $GITHUB_ENV + - shell: bash + run: sudo apt-get update && sudo apt-get install -y libncurses5 + if: env.ImageOS == 'ubuntu22' && (inputs.ghc-version == '8.0.2' || inputs.ghc-version == '8.2.2') + - shell: bash + run: rm -rf /usr/local/.ghcup/* + - shell: bash + run: | + dst=$RUNNER_OS-$ImageOS-$RUNNER_ARCH-ghc-${{ inputs.ghc-version }}.tar.gz + gh release download nightly --repo hspec/setup-haskell -p "$dst" -O - | sudo tar -xzp -C / + env: + GH_TOKEN: ${{ github.token }}