From 2c5de3c50bc9b06bbc9884f6a75690bdce92bb53 Mon Sep 17 00:00:00 2001 From: LKedward Date: Mon, 21 Sep 2020 18:07:20 +0100 Subject: Update: CI workflow with new stack urls Download stack from github releases page. --- .github/workflows/CI.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0a176af..597b385 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -53,16 +53,18 @@ jobs: if: contains(matrix.os, 'macos') run: | mkdir /Users/runner/.local/bin - curl -L https://gist.github.com/certik/0e35f35753ae76f0f575d9b3d3f53633/raw/4cde02cc9215635c9401c2257a46be319e7ab6dd/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C /Users/runner/.local/bin + curl -L https://github.com/commercialhaskell/stack/releases/download/v2.3.3/stack-2.3.3-osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C /Users/runner/.local/bin - name: Install Haskell Linux if: contains(matrix.os, 'ubuntu') - uses: mstksg/setup-stack@v1 + run: | + mkdir -p /home/runner/.local/bin + curl -L https://github.com/commercialhaskell/stack/releases/download/v2.3.3/stack-2.3.3-linux-x86_64.tar.gz | tar --strip-components 1 --wildcards -xz */stack -C /home/runner/.local/bin - name: Install Haskell Windows if: contains(matrix.os, 'windows') run: | - (New-Object System.Net.WebClient).DownloadFile("https://get.haskellstack.org/stable/windows-x86_64.zip", "windows-x86_64.zip") + (New-Object System.Net.WebClient).DownloadFile("https://github.com/commercialhaskell/stack/releases/download/v2.3.3/stack-2.3.3-windows-x86_64.zip", "windows-x86_64.zip") mkdir stack-tmp cd stack-tmp unzip ..\windows-x86_64.zip -- cgit v1.2.3 From 49bea716c0d15d82b5f51f8eda06aed5fd3e9dc7 Mon Sep 17 00:00:00 2001 From: Laurence Kedward Date: Mon, 21 Sep 2020 20:12:04 +0100 Subject: Use pre-installed haskell stack Copy fpm to /usr/local/bin on ubuntu --- .github/workflows/CI.yml | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 597b385..f71f2ee 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -49,28 +49,6 @@ jobs: which gfortran-${GCC_V} which gfortran - - name: Install Haskell macOS - if: contains(matrix.os, 'macos') - run: | - mkdir /Users/runner/.local/bin - curl -L https://github.com/commercialhaskell/stack/releases/download/v2.3.3/stack-2.3.3-osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C /Users/runner/.local/bin - - - name: Install Haskell Linux - if: contains(matrix.os, 'ubuntu') - run: | - mkdir -p /home/runner/.local/bin - curl -L https://github.com/commercialhaskell/stack/releases/download/v2.3.3/stack-2.3.3-linux-x86_64.tar.gz | tar --strip-components 1 --wildcards -xz */stack -C /home/runner/.local/bin - - - name: Install Haskell Windows - if: contains(matrix.os, 'windows') - run: | - (New-Object System.Net.WebClient).DownloadFile("https://github.com/commercialhaskell/stack/releases/download/v2.3.3/stack-2.3.3-windows-x86_64.zip", "windows-x86_64.zip") - mkdir stack-tmp - cd stack-tmp - unzip ..\windows-x86_64.zip - copy stack.exe "C:\Program Files\Git\usr\bin" - cd .. - - name: Install GFortran Linux if: contains(matrix.os, 'ubuntu') run: | @@ -107,6 +85,11 @@ jobs: run: | copy "C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe" "C:\Program Files\Git\usr\bin" + - name: put fpm to PATH (Linux) + if: contains(matrix.os, 'ubuntu') + run: | + cp /home/runner/.local/bin/fpm /usr/local/bin + - name: Run tests on Haskell fpm run: | cd bootstrap -- cgit v1.2.3 From 0371b8ecbe0cf42bbfbb75672e6e8a677a2adee9 Mon Sep 17 00:00:00 2001 From: Laurence Kedward Date: Mon, 21 Sep 2020 20:15:30 +0100 Subject: Fix CI with su in ubuntu --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f71f2ee..03fcf84 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -88,7 +88,7 @@ jobs: - name: put fpm to PATH (Linux) if: contains(matrix.os, 'ubuntu') run: | - cp /home/runner/.local/bin/fpm /usr/local/bin + sudo cp /home/runner/.local/bin/fpm /usr/local/bin - name: Run tests on Haskell fpm run: | -- cgit v1.2.3