From ec474d7eb25bd36c5882de736caa584064b1d1fc Mon Sep 17 00:00:00 2001 From: "Harry Garrood harry@garrood.me" Date: Sat, 19 Jun 2021 16:08:48 +0100 Subject: [PATCH 1/2] Deployment fixes - Fix deploys by using an absolute directory for XDG_CACHE_HOME - Pin CI to Ubuntu 20.04, and add note that this must be kept in sync with the server --- .github/workflows/ci.yml | 12 ++++++++---- deploy/start | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77adc9fb..16b685d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,14 +11,18 @@ on: env: SERVER_ASSET: trypurescript-server CLIENT_ASSET: trypurescript-client + # Note that this must be kept in sync with the version of Ubuntu which the + # Try PureScript server is running, otherwise the server binary may fail to + # run. + RUNS_ON: ubuntu-20.04 jobs: build_server: name: Build server - runs-on: ubuntu-latest + runs-on: ${{ env.RUNS_ON }} steps: - uses: actions/checkout@v2 - + - uses: haskell/actions/setup@v1 with: enable-stack: true @@ -59,7 +63,7 @@ jobs: build_client: name: Build client - runs-on: ubuntu-latest + runs-on: ${{ env.RUNS_ON }} steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -90,7 +94,7 @@ jobs: release: name: Release - runs-on: ubuntu-latest + runs-on: ${{ env.RUNS_ON }} if: github.event_name == 'release' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/deploy/start b/deploy/start index 4ea236a4..0b4815d4 100755 --- a/deploy/start +++ b/deploy/start @@ -2,6 +2,6 @@ set -ex set -o noglob -export XDG_CACHE_HOME=.spago-cache +export XDG_CACHE_HOME="$PWD/.spago-cache" spago install exec trypurescript +RTS -N2 -A128m -M3G -RTS 8081 $(spago sources) From 6a260a4eff6dd5a71c6ab7725cab2cc1d9170de9 Mon Sep 17 00:00:00 2001 From: "Harry Garrood harry@garrood.me" Date: Sat, 19 Jun 2021 16:13:50 +0100 Subject: [PATCH 2/2] Fix CI workflow syntax --- .github/workflows/ci.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16b685d9..5d0bf896 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,15 +11,14 @@ on: env: SERVER_ASSET: trypurescript-server CLIENT_ASSET: trypurescript-client - # Note that this must be kept in sync with the version of Ubuntu which the - # Try PureScript server is running, otherwise the server binary may fail to - # run. - RUNS_ON: ubuntu-20.04 jobs: build_server: name: Build server - runs-on: ${{ env.RUNS_ON }} + # Note that this must be kept in sync with the version of Ubuntu which the + # Try PureScript server is running, otherwise the server binary may fail to + # run. + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 @@ -63,7 +62,10 @@ jobs: build_client: name: Build client - runs-on: ${{ env.RUNS_ON }} + # Note that this must be kept in sync with the version of Ubuntu which the + # Try PureScript server is running, otherwise the server binary may fail to + # run. + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -94,7 +96,10 @@ jobs: release: name: Release - runs-on: ${{ env.RUNS_ON }} + # Note that this must be kept in sync with the version of Ubuntu which the + # Try PureScript server is running, otherwise the server binary may fail to + # run. + runs-on: ubuntu-20.04 if: github.event_name == 'release' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}