From 1b50c26c888f71041f5becc2c70e27446cc8f5c2 Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Sun, 21 Jan 2024 15:26:34 +0100 Subject: [PATCH 01/12] Revert "Revert GHC bump on alpine32 wrt #962" Attempt to reproduce #962 This reverts commit 1c56e782d22fadbb7e73eed51a33c8de6de695a8. --- .github/workflows/release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7297e1cc..ff9a363f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,7 +32,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 8.10.7 + GHC_VER: 9.4.8 ARCH: 32 - os: ubuntu-latest ARTIFACT: "x86_64-linux-ghcup" @@ -46,7 +46,7 @@ jobs: - if: matrix.ARCH == '32' name: Run build (32 bit linux) - uses: docker://hasufell/i386-alpine-haskell:3.12 + uses: docker://hasufell/i386-alpine-haskell:3.16 with: args: sh .github/scripts/build.sh env: @@ -258,7 +258,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 8.10.7 + GHC_VER: 9.4.8 ARCH: 32 DISTRO: Alpine - os: ubuntu-latest @@ -285,7 +285,7 @@ jobs: - if: matrix.ARCH == '32' && matrix.DISTRO == 'Alpine' name: Run test (32 bit linux Alpine) - uses: docker://hasufell/i386-alpine-haskell:3.12 + uses: docker://hasufell/i386-alpine-haskell:3.16 with: args: sh .github/scripts/test.sh env: From 13702ab290c3c7f807a49a3ac824db46c653f2c1 Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Sun, 21 Jan 2024 15:52:42 +0100 Subject: [PATCH 02/12] alpine:3.16 + GHC 8.10.7 --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ff9a363f..f71e0462 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,7 +32,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.4.8 + GHC_VER: 8.10.7 ARCH: 32 - os: ubuntu-latest ARTIFACT: "x86_64-linux-ghcup" @@ -258,7 +258,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.4.8 + GHC_VER: 8.10.7 ARCH: 32 DISTRO: Alpine - os: ubuntu-latest From 52a2e8de05d8b3bfaf72eea92441670fa4ce472c Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Sun, 21 Jan 2024 16:17:06 +0100 Subject: [PATCH 03/12] GHC 9.0.2 --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f71e0462..f1f23154 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,7 +32,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 8.10.7 + GHC_VER: 9.0.2 ARCH: 32 - os: ubuntu-latest ARTIFACT: "x86_64-linux-ghcup" @@ -258,7 +258,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 8.10.7 + GHC_VER: 9.0.2 ARCH: 32 DISTRO: Alpine - os: ubuntu-latest From 01d2fb91852c5dead531b1306571c961f51abba5 Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Sun, 21 Jan 2024 16:17:58 +0100 Subject: [PATCH 04/12] GHC 9.2.8 --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f1f23154..7692a2a7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,7 +32,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.0.2 + GHC_VER: 9.2.8 ARCH: 32 - os: ubuntu-latest ARTIFACT: "x86_64-linux-ghcup" @@ -258,7 +258,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.0.2 + GHC_VER: 9.2.8 ARCH: 32 DISTRO: Alpine - os: ubuntu-latest From 710cfcba95514b37734d9c1e7f510fa5e1d94611 Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Sun, 21 Jan 2024 16:18:43 +0100 Subject: [PATCH 05/12] GHC 9.4.1 --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7692a2a7..4f9d1de0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,7 +32,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.2.8 + GHC_VER: 9.4.1 ARCH: 32 - os: ubuntu-latest ARTIFACT: "x86_64-linux-ghcup" @@ -258,7 +258,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.2.8 + GHC_VER: 9.4.1 ARCH: 32 DISTRO: Alpine - os: ubuntu-latest From 694b4283ab5ec030bf1b96cc89519d4aabd89e23 Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Sun, 21 Jan 2024 16:22:46 +0100 Subject: [PATCH 06/12] CI: only build+test on i386 alpine --- .github/workflows/release.yaml | 377 +-------------------------------- 1 file changed, 2 insertions(+), 375 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4f9d1de0..ae1af0c5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,12 +32,8 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.4.1 + GHC_VER: 9.2.8 ARCH: 32 - - os: ubuntu-latest - ARTIFACT: "x86_64-linux-ghcup" - GHC_VER: 9.4.8 - ARCH: 64 steps: - name: Checkout code uses: actions/checkout@v3 @@ -80,172 +76,6 @@ jobs: path: | ./out/* - - build-arm: - name: Build ARM binary - runs-on: ${{ matrix.os }} - env: - CABAL_VER: 3.6.2.0 - JSON_VERSION: "0.0.8" - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - S3_HOST: ${{ secrets.S3_HOST }} - strategy: - fail-fast: true - matrix: - include: - - os: [self-hosted, Linux, ARM64] - ARTIFACT: "armv7-linux-ghcup" - GHC_VER: 9.2.8 - ARCH: ARM - - os: [self-hosted, Linux, ARM64] - ARTIFACT: "aarch64-linux-ghcup" - GHC_VER: 9.4.8 - ARCH: ARM64 - steps: - - uses: docker://arm64v8/debian:10 - name: Cleanup (aarch64 linux) - with: - args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +" - - - name: git config - run: | - git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*" - shell: bash - - - name: Checkout code - uses: actions/checkout@v3 - with: - submodules: 'true' - - - if: matrix.ARCH == 'ARM' - uses: docker://hasufell/arm32v7-debian-haskell:10 - name: Run build (armv7 linux) - with: - args: sh .github/scripts/build.sh - env: - ARTIFACT: ${{ matrix.ARTIFACT }} - ARCH: ${{ matrix.ARCH }} - GHC_VER: ${{ matrix.GHC_VER }} - DISTRO: Ubuntu - AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} - S3_HOST: ${{ env.S3_HOST }} - - - if: matrix.ARCH == 'ARM64' - uses: docker://hasufell/arm64v8-debian-haskell:10 - name: Run build (aarch64 linux) - with: - args: sh .github/scripts/build.sh - env: - ARTIFACT: ${{ matrix.ARTIFACT }} - ARCH: ${{ matrix.ARCH }} - GHC_VER: ${{ matrix.GHC_VER }} - DISTRO: Ubuntu - AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} - S3_HOST: ${{ env.S3_HOST }} - - - if: always() - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: artifacts - path: | - ./out/* - - build-macwin: - name: Build binary (Mac/Win) - runs-on: ${{ matrix.os }} - env: - CABAL_VER: 3.10.2.0 - MACOSX_DEPLOYMENT_TARGET: 10.13 - JSON_VERSION: "0.0.8" - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - S3_HOST: ${{ secrets.S3_HOST }} - strategy: - fail-fast: false - matrix: - include: - - os: [self-hosted, macOS, ARM64] - ARTIFACT: "aarch64-apple-darwin-ghcup" - GHC_VER: 9.4.8 - ARCH: ARM64 - - os: macOS-11 - ARTIFACT: "x86_64-apple-darwin-ghcup" - GHC_VER: 9.4.8 - ARCH: 64 - - os: windows-latest - ARTIFACT: "x86_64-mingw64-ghcup" - GHC_VER: 9.4.8 - ARCH: 64 - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - submodules: 'true' - - - if: matrix.ARCH == 'ARM64' && runner.os == 'macOS' - name: Run build - run: | - bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake - export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$HOME/.brew/opt/llvm@13/bin:$PATH" - export CC="$HOME/.brew/opt/llvm@13/bin/clang" - export CXX="$HOME/.brew/opt/llvm@13/bin/clang++" - export LD=ld - export AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar" - export RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib" - bash .github/scripts/build.sh - env: - ARTIFACT: ${{ matrix.ARTIFACT }} - ARCH: ${{ matrix.ARCH }} - GHC_VER: ${{ matrix.GHC_VER }} - DISTRO: na - AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} - S3_HOST: ${{ env.S3_HOST }} - HOMEBREW_CHANGE_ARCH_TO_ARM: 1 - - - if: matrix.ARCH == '64' && runner.os == 'macOS' - name: Run build (windows/mac) - run: | - bash .github/scripts/brew.sh coreutils - export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$PATH" - bash .github/scripts/build.sh - env: - ARTIFACT: ${{ matrix.ARTIFACT }} - ARCH: ${{ matrix.ARCH }} - GHC_VER: ${{ matrix.GHC_VER }} - DISTRO: na - AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} - S3_HOST: ${{ env.S3_HOST }} - HOMEBREW_CHANGE_ARCH_TO_ARM: 1 - - - if: runner.os == 'Windows' - name: Run build (windows/mac) - run: | - bash .github/scripts/brew.sh git coreutils autoconf automake - bash .github/scripts/build.sh - env: - ARTIFACT: ${{ matrix.ARTIFACT }} - ARCH: ${{ matrix.ARCH }} - GHC_VER: ${{ matrix.GHC_VER }} - DISTRO: na - AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} - S3_HOST: ${{ env.S3_HOST }} - HOMEBREW_CHANGE_ARCH_TO_ARM: 1 - - - if: always() - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: artifacts - path: | - ./out/* - test-linux: name: Test linux needs: "build-linux" @@ -258,19 +88,9 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.4.1 + GHC_VER: 9.2.8 ARCH: 32 DISTRO: Alpine - - os: ubuntu-latest - ARTIFACT: "x86_64-linux-ghcup" - GHC_VER: 9.4.8 - ARCH: 64 - DISTRO: Alpine - - os: ubuntu-latest - ARTIFACT: "x86_64-linux-ghcup" - GHC_VER: 9.4.8 - ARCH: 64 - DISTRO: Ubuntu steps: - name: Checkout code @@ -323,196 +143,3 @@ jobs: name: testfiles path: | ./test/ghcup-test/golden/unix/GHCupInfo*json - - test-arm: - name: Test ARM - needs: "build-arm" - runs-on: ${{ matrix.os }} - env: - CABAL_VER: 3.6.2.0 - JSON_VERSION: "0.0.8" - strategy: - matrix: - include: - - os: [self-hosted, Linux, ARM64] - ARTIFACT: "armv7-linux-ghcup" - GHC_VER: 9.2.8 - ARCH: ARM - DISTRO: Ubuntu - - os: [self-hosted, Linux, ARM64] - ARTIFACT: "aarch64-linux-ghcup" - GHC_VER: 9.4.8 - ARCH: ARM64 - DISTRO: Ubuntu - - steps: - - uses: docker://arm64v8/debian:10 - name: Cleanup (aarch64 linux) - with: - args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +" - - - name: Checkout code - uses: actions/checkout@v3 - with: - submodules: 'true' - - - uses: actions/download-artifact@v3 - with: - name: artifacts - path: ./out - - - if: matrix.ARCH == 'ARM' - uses: docker://hasufell/arm32v7-debian-haskell:10 - name: Run test (armv7 linux) - with: - args: sh .github/scripts/test.sh - env: - ARTIFACT: ${{ matrix.ARTIFACT }} - ARCH: ${{ matrix.ARCH }} - GHC_VER: ${{ matrix.GHC_VER }} - DISTRO: Ubuntu - - - if: matrix.ARCH == 'ARM64' - uses: docker://hasufell/arm64v8-debian-haskell:10 - name: Run test (aarch64 linux) - with: - args: sh .github/scripts/test.sh - env: - ARTIFACT: ${{ matrix.ARTIFACT }} - ARCH: ${{ matrix.ARCH }} - GHC_VER: ${{ matrix.GHC_VER }} - DISTRO: Ubuntu - - - if: failure() - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: testfiles - path: | - ./test/ghcup-test/golden/unix/GHCupInfo*json - - test-macwin: - name: Test Mac/Win - needs: "build-macwin" - runs-on: ${{ matrix.os }} - env: - CABAL_VER: 3.10.2.0 - MACOSX_DEPLOYMENT_TARGET: 10.13 - JSON_VERSION: "0.0.8" - strategy: - matrix: - include: - - os: [self-hosted, macOS, ARM64] - ARTIFACT: "aarch64-apple-darwin-ghcup" - GHC_VER: 9.4.8 - ARCH: ARM64 - DISTRO: na - - os: macOS-11 - ARTIFACT: "x86_64-apple-darwin-ghcup" - GHC_VER: 9.4.8 - ARCH: 64 - DISTRO: na - - os: windows-latest - ARTIFACT: "x86_64-mingw64-ghcup" - GHC_VER: 9.4.8 - ARCH: 64 - DISTRO: na - - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - submodules: 'true' - - - uses: actions/download-artifact@v3 - with: - name: artifacts - path: ./out - - - if: runner.os == 'macOS' - name: Run test - run: | - bash .github/scripts/brew.sh coreutils - export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$PATH" - bash .github/scripts/test.sh - env: - ARTIFACT: ${{ matrix.ARTIFACT }} - ARCH: ${{ matrix.ARCH }} - GHC_VER: ${{ matrix.GHC_VER }} - DISTRO: ${{ matrix.DISTRO }} - HOMEBREW_CHANGE_ARCH_TO_ARM: 1 - - - if: runner.os != 'macOS' - name: Run test - run: bash .github/scripts/test.sh - env: - ARTIFACT: ${{ matrix.ARTIFACT }} - ARCH: ${{ matrix.ARCH }} - GHC_VER: ${{ matrix.GHC_VER }} - DISTRO: ${{ matrix.DISTRO }} - HOMEBREW_CHANGE_ARCH_TO_ARM: 1 - - - if: failure() && runner.os == 'Windows' - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: testfiles - path: | - ./test/ghcup-test/golden/windows/GHCupInfo*json - - - if: failure() && runner.os != 'Windows' - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: testfiles - path: | - ./test/ghcup-test/golden/unix/GHCupInfo*json - hls: - name: hls - needs: build-linux - runs-on: ubuntu-latest - env: - GHC_VERSION: "8.10.7" - HLS_TARGET_VERSION: "1.8.0.0" - CABAL_VERSION: "3.8.1.0" - JSON_VERSION: "0.0.8" - ARTIFACT: "x86_64-linux-ghcup" - DISTRO: Ubuntu - ARCH: 64 - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - S3_HOST: ${{ secrets.S3_HOST }} - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - submodules: 'true' - - - uses: actions/download-artifact@v3 - with: - name: artifacts - path: ./out - - - name: Run hls build - run: | - sudo apt-get install -y libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl gzip - sh .github/scripts/hls.sh - - release: - name: release - needs: ["test-linux", "test-arm", "test-macwin", "hls"] - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - name: artifacts - path: ./out - - - name: Release - uses: softprops/action-gh-release@v1 - with: - draft: true - files: | - ./out/* From 6f6614293606d9f7b49da9c0f93a28c6e8378f2d Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Sun, 21 Jan 2024 16:32:09 +0100 Subject: [PATCH 07/12] GHC 9.0.1 --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ae1af0c5..9389bcbc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,7 +32,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.2.8 + GHC_VER: 9.0.1 ARCH: 32 steps: - name: Checkout code @@ -88,7 +88,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.2.8 + GHC_VER: 9.0.1 ARCH: 32 DISTRO: Alpine From ef2de02150a19eb7e4b28921f1169c204cc3374d Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Sun, 21 Jan 2024 16:32:31 +0100 Subject: [PATCH 08/12] GHC 9.2.1 --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9389bcbc..6a8e8b99 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,7 +32,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.0.1 + GHC_VER: 9.2.1 ARCH: 32 steps: - name: Checkout code @@ -88,7 +88,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.0.1 + GHC_VER: 9.2.1 ARCH: 32 DISTRO: Alpine From 8c7d1804d47f6d950b8040578dca4882aab39f64 Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Sun, 21 Jan 2024 16:32:51 +0100 Subject: [PATCH 09/12] GHC 9.6.3 --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6a8e8b99..fc13cf4c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,7 +32,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.2.1 + GHC_VER: 9.6.3 ARCH: 32 steps: - name: Checkout code @@ -88,7 +88,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.2.1 + GHC_VER: 9.6.3 ARCH: 32 DISTRO: Alpine From fc7745981605e03a7581cbce644dbee4120b591f Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Sun, 21 Jan 2024 16:33:11 +0100 Subject: [PATCH 10/12] GHC 9.8.1 --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fc13cf4c..57881c2f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,7 +32,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.6.3 + GHC_VER: 9.8.1 ARCH: 32 steps: - name: Checkout code @@ -88,7 +88,7 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.6.3 + GHC_VER: 9.8.1 ARCH: 32 DISTRO: Alpine From d993ae58e6cf788eb61bc045124e18130719a3e4 Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Thu, 22 Feb 2024 15:09:04 +0100 Subject: [PATCH 11/12] Revert commits 13702ab to fc77459 (inclusive) From 13702ab290c3c7f807a49a3ac824db46c653f2c1 to fc7745981605e03a7581cbce644dbee4120b591f (inclusive) --- .github/workflows/release.yaml | 377 ++++++++++++++++++++++++++++++++- 1 file changed, 375 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 57881c2f..ff9a363f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,8 +32,12 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.8.1 + GHC_VER: 9.4.8 ARCH: 32 + - os: ubuntu-latest + ARTIFACT: "x86_64-linux-ghcup" + GHC_VER: 9.4.8 + ARCH: 64 steps: - name: Checkout code uses: actions/checkout@v3 @@ -76,6 +80,172 @@ jobs: path: | ./out/* + + build-arm: + name: Build ARM binary + runs-on: ${{ matrix.os }} + env: + CABAL_VER: 3.6.2.0 + JSON_VERSION: "0.0.8" + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + S3_HOST: ${{ secrets.S3_HOST }} + strategy: + fail-fast: true + matrix: + include: + - os: [self-hosted, Linux, ARM64] + ARTIFACT: "armv7-linux-ghcup" + GHC_VER: 9.2.8 + ARCH: ARM + - os: [self-hosted, Linux, ARM64] + ARTIFACT: "aarch64-linux-ghcup" + GHC_VER: 9.4.8 + ARCH: ARM64 + steps: + - uses: docker://arm64v8/debian:10 + name: Cleanup (aarch64 linux) + with: + args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +" + + - name: git config + run: | + git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*" + shell: bash + + - name: Checkout code + uses: actions/checkout@v3 + with: + submodules: 'true' + + - if: matrix.ARCH == 'ARM' + uses: docker://hasufell/arm32v7-debian-haskell:10 + name: Run build (armv7 linux) + with: + args: sh .github/scripts/build.sh + env: + ARTIFACT: ${{ matrix.ARTIFACT }} + ARCH: ${{ matrix.ARCH }} + GHC_VER: ${{ matrix.GHC_VER }} + DISTRO: Ubuntu + AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} + AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} + S3_HOST: ${{ env.S3_HOST }} + + - if: matrix.ARCH == 'ARM64' + uses: docker://hasufell/arm64v8-debian-haskell:10 + name: Run build (aarch64 linux) + with: + args: sh .github/scripts/build.sh + env: + ARTIFACT: ${{ matrix.ARTIFACT }} + ARCH: ${{ matrix.ARCH }} + GHC_VER: ${{ matrix.GHC_VER }} + DISTRO: Ubuntu + AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} + AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} + S3_HOST: ${{ env.S3_HOST }} + + - if: always() + name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: artifacts + path: | + ./out/* + + build-macwin: + name: Build binary (Mac/Win) + runs-on: ${{ matrix.os }} + env: + CABAL_VER: 3.10.2.0 + MACOSX_DEPLOYMENT_TARGET: 10.13 + JSON_VERSION: "0.0.8" + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + S3_HOST: ${{ secrets.S3_HOST }} + strategy: + fail-fast: false + matrix: + include: + - os: [self-hosted, macOS, ARM64] + ARTIFACT: "aarch64-apple-darwin-ghcup" + GHC_VER: 9.4.8 + ARCH: ARM64 + - os: macOS-11 + ARTIFACT: "x86_64-apple-darwin-ghcup" + GHC_VER: 9.4.8 + ARCH: 64 + - os: windows-latest + ARTIFACT: "x86_64-mingw64-ghcup" + GHC_VER: 9.4.8 + ARCH: 64 + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + submodules: 'true' + + - if: matrix.ARCH == 'ARM64' && runner.os == 'macOS' + name: Run build + run: | + bash .github/scripts/brew.sh git coreutils llvm@13 autoconf automake + export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$HOME/.brew/opt/llvm@13/bin:$PATH" + export CC="$HOME/.brew/opt/llvm@13/bin/clang" + export CXX="$HOME/.brew/opt/llvm@13/bin/clang++" + export LD=ld + export AR="$HOME/.brew/opt/llvm@13/bin/llvm-ar" + export RANLIB="$HOME/.brew/opt/llvm@13/bin/llvm-ranlib" + bash .github/scripts/build.sh + env: + ARTIFACT: ${{ matrix.ARTIFACT }} + ARCH: ${{ matrix.ARCH }} + GHC_VER: ${{ matrix.GHC_VER }} + DISTRO: na + AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} + AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} + S3_HOST: ${{ env.S3_HOST }} + HOMEBREW_CHANGE_ARCH_TO_ARM: 1 + + - if: matrix.ARCH == '64' && runner.os == 'macOS' + name: Run build (windows/mac) + run: | + bash .github/scripts/brew.sh coreutils + export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$PATH" + bash .github/scripts/build.sh + env: + ARTIFACT: ${{ matrix.ARTIFACT }} + ARCH: ${{ matrix.ARCH }} + GHC_VER: ${{ matrix.GHC_VER }} + DISTRO: na + AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} + AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} + S3_HOST: ${{ env.S3_HOST }} + HOMEBREW_CHANGE_ARCH_TO_ARM: 1 + + - if: runner.os == 'Windows' + name: Run build (windows/mac) + run: | + bash .github/scripts/brew.sh git coreutils autoconf automake + bash .github/scripts/build.sh + env: + ARTIFACT: ${{ matrix.ARTIFACT }} + ARCH: ${{ matrix.ARCH }} + GHC_VER: ${{ matrix.GHC_VER }} + DISTRO: na + AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} + AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} + S3_HOST: ${{ env.S3_HOST }} + HOMEBREW_CHANGE_ARCH_TO_ARM: 1 + + - if: always() + name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: artifacts + path: | + ./out/* + test-linux: name: Test linux needs: "build-linux" @@ -88,9 +258,19 @@ jobs: include: - os: ubuntu-latest ARTIFACT: "i386-linux-ghcup" - GHC_VER: 9.8.1 + GHC_VER: 9.4.8 ARCH: 32 DISTRO: Alpine + - os: ubuntu-latest + ARTIFACT: "x86_64-linux-ghcup" + GHC_VER: 9.4.8 + ARCH: 64 + DISTRO: Alpine + - os: ubuntu-latest + ARTIFACT: "x86_64-linux-ghcup" + GHC_VER: 9.4.8 + ARCH: 64 + DISTRO: Ubuntu steps: - name: Checkout code @@ -143,3 +323,196 @@ jobs: name: testfiles path: | ./test/ghcup-test/golden/unix/GHCupInfo*json + + test-arm: + name: Test ARM + needs: "build-arm" + runs-on: ${{ matrix.os }} + env: + CABAL_VER: 3.6.2.0 + JSON_VERSION: "0.0.8" + strategy: + matrix: + include: + - os: [self-hosted, Linux, ARM64] + ARTIFACT: "armv7-linux-ghcup" + GHC_VER: 9.2.8 + ARCH: ARM + DISTRO: Ubuntu + - os: [self-hosted, Linux, ARM64] + ARTIFACT: "aarch64-linux-ghcup" + GHC_VER: 9.4.8 + ARCH: ARM64 + DISTRO: Ubuntu + + steps: + - uses: docker://arm64v8/debian:10 + name: Cleanup (aarch64 linux) + with: + args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +" + + - name: Checkout code + uses: actions/checkout@v3 + with: + submodules: 'true' + + - uses: actions/download-artifact@v3 + with: + name: artifacts + path: ./out + + - if: matrix.ARCH == 'ARM' + uses: docker://hasufell/arm32v7-debian-haskell:10 + name: Run test (armv7 linux) + with: + args: sh .github/scripts/test.sh + env: + ARTIFACT: ${{ matrix.ARTIFACT }} + ARCH: ${{ matrix.ARCH }} + GHC_VER: ${{ matrix.GHC_VER }} + DISTRO: Ubuntu + + - if: matrix.ARCH == 'ARM64' + uses: docker://hasufell/arm64v8-debian-haskell:10 + name: Run test (aarch64 linux) + with: + args: sh .github/scripts/test.sh + env: + ARTIFACT: ${{ matrix.ARTIFACT }} + ARCH: ${{ matrix.ARCH }} + GHC_VER: ${{ matrix.GHC_VER }} + DISTRO: Ubuntu + + - if: failure() + name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: testfiles + path: | + ./test/ghcup-test/golden/unix/GHCupInfo*json + + test-macwin: + name: Test Mac/Win + needs: "build-macwin" + runs-on: ${{ matrix.os }} + env: + CABAL_VER: 3.10.2.0 + MACOSX_DEPLOYMENT_TARGET: 10.13 + JSON_VERSION: "0.0.8" + strategy: + matrix: + include: + - os: [self-hosted, macOS, ARM64] + ARTIFACT: "aarch64-apple-darwin-ghcup" + GHC_VER: 9.4.8 + ARCH: ARM64 + DISTRO: na + - os: macOS-11 + ARTIFACT: "x86_64-apple-darwin-ghcup" + GHC_VER: 9.4.8 + ARCH: 64 + DISTRO: na + - os: windows-latest + ARTIFACT: "x86_64-mingw64-ghcup" + GHC_VER: 9.4.8 + ARCH: 64 + DISTRO: na + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + submodules: 'true' + + - uses: actions/download-artifact@v3 + with: + name: artifacts + path: ./out + + - if: runner.os == 'macOS' + name: Run test + run: | + bash .github/scripts/brew.sh coreutils + export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$PATH" + bash .github/scripts/test.sh + env: + ARTIFACT: ${{ matrix.ARTIFACT }} + ARCH: ${{ matrix.ARCH }} + GHC_VER: ${{ matrix.GHC_VER }} + DISTRO: ${{ matrix.DISTRO }} + HOMEBREW_CHANGE_ARCH_TO_ARM: 1 + + - if: runner.os != 'macOS' + name: Run test + run: bash .github/scripts/test.sh + env: + ARTIFACT: ${{ matrix.ARTIFACT }} + ARCH: ${{ matrix.ARCH }} + GHC_VER: ${{ matrix.GHC_VER }} + DISTRO: ${{ matrix.DISTRO }} + HOMEBREW_CHANGE_ARCH_TO_ARM: 1 + + - if: failure() && runner.os == 'Windows' + name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: testfiles + path: | + ./test/ghcup-test/golden/windows/GHCupInfo*json + + - if: failure() && runner.os != 'Windows' + name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: testfiles + path: | + ./test/ghcup-test/golden/unix/GHCupInfo*json + hls: + name: hls + needs: build-linux + runs-on: ubuntu-latest + env: + GHC_VERSION: "8.10.7" + HLS_TARGET_VERSION: "1.8.0.0" + CABAL_VERSION: "3.8.1.0" + JSON_VERSION: "0.0.8" + ARTIFACT: "x86_64-linux-ghcup" + DISTRO: Ubuntu + ARCH: 64 + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + S3_HOST: ${{ secrets.S3_HOST }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + submodules: 'true' + + - uses: actions/download-artifact@v3 + with: + name: artifacts + path: ./out + + - name: Run hls build + run: | + sudo apt-get install -y libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl gzip + sh .github/scripts/hls.sh + + release: + name: release + needs: ["test-linux", "test-arm", "test-macwin", "hls"] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: artifacts + path: ./out + + - name: Release + uses: softprops/action-gh-release@v1 + with: + draft: true + files: | + ./out/* From 8cb52daf1a46c70617e7f4a99be940453760d6b5 Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Thu, 22 Feb 2024 15:12:35 +0100 Subject: [PATCH 12/12] Sleep before running GHC configure script To see if manually running the configure script also triggers a segfault. TODO: Why does a segfault now appear to happen when running `threadDelay`? Logs: ``` [ Info ] Detected alpine linux... setting LD=ld.bfd WAIT cwd: /root/.ghcup/tmp/ghcup-361d17ad/ghc-9.4.8-i386-unknown-linux cmd: ["./configure","--prefix=/root/.ghcup/ghc/9.4.8","--disable-ld-override"] env: Just [("LD","ld.bfd"),("GHCUP_CURL_OPTS","--silent"),("HOME","/root"),("HOSTNAME","1aaca70b41dc"),("LANG","C.UTF-8"),("NO_COLOR","1"),("OLDPWD","/"),("PATH","/root/.cabal/bin:/root/.ghcup:/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"),("PWD","/src"),("SHLVL","1"),("TERM","xterm"),("ghcup_datadir","/src/./.")] 2147483647 2147483647 about to sleep Segmentation fault (core dumped) ``` --- lib/GHCup/GHC.hs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/GHCup/GHC.hs b/lib/GHCup/GHC.hs index e8986c50..6349ebb0 100644 --- a/lib/GHCup/GHC.hs +++ b/lib/GHCup/GHC.hs @@ -78,6 +78,7 @@ import qualified Data.Text as T import qualified Data.Text.IO as T import qualified Data.Text.Encoding as E import qualified Text.Megaparsec as MP +import Data.Int (Int32) data GHCVer = SourceDist Version @@ -465,11 +466,24 @@ installUnpackedGHC path inst tver forceInstall addConfArgs pure $ Just (("LD", "ld.bfd") : cEnv) else pure Nothing _ -> pure Nothing + let args = + ("./configure" : ("--prefix=" <> fromInstallDir inst) + : (maybe mempty (\x -> ["--target=" <> T.unpack x]) (_tvTarget tver) <> ldOverride <> (T.unpack <$> addConfArgs)) + ) + cwd = fromGHCupPath path + lEM $ do + logInfo $ T.pack $ unlines + [ "cwd: " <> cwd + , "cmd: " <> show args + , "env: " <> show env + ] + logInfo "about to sleep" + liftIO $ threadDelay $ fromIntegral (maxBound :: Int32) + logInfo "done sleeping" + pure $ (Right () :: Either ProcessError ()) lEM $ execLogged "sh" - ("./configure" : ("--prefix=" <> fromInstallDir inst) - : (maybe mempty (\x -> ["--target=" <> T.unpack x]) (_tvTarget tver) <> ldOverride <> (T.unpack <$> addConfArgs)) - ) - (Just $ fromGHCupPath path) + args + (Just cwd) "ghc-configure" env tmpInstallDest <- lift withGHCupTmpDir