mirror of
https://github.com/swarm-game/swarm.git
synced 2024-09-11 14:46:33 +03:00
parent
02c7933a01
commit
54304e797a
22
.github/workflows/haskell-release.yml
vendored
22
.github/workflows/haskell-release.yml
vendored
@ -33,7 +33,7 @@ jobs:
|
||||
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
|
||||
|
||||
- name: Save Release URL File for publish
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release_url
|
||||
path: release_url.txt
|
||||
@ -46,13 +46,13 @@ jobs:
|
||||
# It might be good idea to use older runner for building binary:
|
||||
# on latest runners like fedora, it would link symbols in newer
|
||||
# system libraries, so users could not run it on older OSes
|
||||
image: buildpack-deps:bionic
|
||||
image: buildpack-deps:jammy
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- compiler: ghc-8.10.7
|
||||
- compiler: ghc-9.8.2
|
||||
compilerKind: ghc
|
||||
compilerVersion: 8.10.7
|
||||
compilerVersion: 9.8.2
|
||||
setup-method: ghcup
|
||||
steps:
|
||||
- name: apt
|
||||
@ -60,10 +60,10 @@ jobs:
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
|
||||
mkdir -p "$HOME/.ghcup/bin"
|
||||
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
|
||||
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
|
||||
chmod a+x "$HOME/.ghcup/bin/ghcup"
|
||||
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
|
||||
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
|
||||
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
|
||||
env:
|
||||
HCKIND: ${{ matrix.compilerKind }}
|
||||
HCNAME: ${{ matrix.compiler }}
|
||||
@ -79,7 +79,7 @@ jobs:
|
||||
echo "HC=$HC" >> "$GITHUB_ENV"
|
||||
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
|
||||
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
|
||||
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
|
||||
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
|
||||
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
|
||||
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
|
||||
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
|
||||
@ -124,7 +124,7 @@ jobs:
|
||||
run: |
|
||||
$CABAL v2-update -v
|
||||
- name: cache (tools)
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-436fbe9d
|
||||
path: ~/.haskell-ci-tools
|
||||
@ -133,7 +133,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
|
||||
path: ~/.cabal/store
|
||||
@ -151,14 +151,14 @@ jobs:
|
||||
run: echo BINARY_PATH="./dist/swarm" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Load Release URL File from release job
|
||||
uses: actions/download-artifact@v1
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: release_url
|
||||
|
||||
- name: Get Release File Name & Upload URL
|
||||
id: get_release_info
|
||||
run: |
|
||||
echo "::set-output name=upload_url::$(cat release_url/release_url.txt)"
|
||||
echo "upload_url=$(cat release_url/release_url.txt)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
|
Loading…
Reference in New Issue
Block a user