Debug issue #962 #1148
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and release | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: '0 2 * * *' | |
env: | |
CABAL_CACHE_DISABLE: ${{ vars.CABAL_CACHE_DISABLE }} | |
CABAL_CACHE_NONFATAL: yes | |
jobs: | |
build-linux: | |
name: Build linux binary | |
runs-on: ${{ matrix.os }} | |
env: | |
CABAL_VER: 3.10.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: ubuntu-latest | |
ARTIFACT: "i386-linux-ghcup" | |
GHC_VER: 9.0.1 | |
ARCH: 32 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- if: matrix.ARCH == '32' | |
name: Run build (32 bit linux) | |
uses: docker://hasufell/i386-alpine-haskell:3.16 | |
with: | |
args: sh .github/scripts/build.sh | |
env: | |
ARTIFACT: ${{ matrix.ARTIFACT }} | |
ARCH: ${{ matrix.ARCH }} | |
GHC_VER: ${{ matrix.GHC_VER }} | |
DISTRO: Alpine | |
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 == '64' | |
name: Run build (64 bit linux) | |
uses: docker://hasufell/alpine-haskell:3.12 | |
with: | |
args: sh .github/scripts/build.sh | |
env: | |
ARTIFACT: ${{ matrix.ARTIFACT }} | |
ARCH: ${{ matrix.ARCH }} | |
GHC_VER: ${{ matrix.GHC_VER }} | |
DISTRO: Alpine | |
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/* | |
test-linux: | |
name: Test linux | |
needs: "build-linux" | |
runs-on: ${{ matrix.os }} | |
env: | |
CABAL_VER: 3.10.2.0 | |
JSON_VERSION: "0.0.8" | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
ARTIFACT: "i386-linux-ghcup" | |
GHC_VER: 9.0.1 | |
ARCH: 32 | |
DISTRO: Alpine | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifacts | |
path: ./out | |
- if: matrix.ARCH == '32' && matrix.DISTRO == 'Alpine' | |
name: Run test (32 bit linux Alpine) | |
uses: docker://hasufell/i386-alpine-haskell:3.16 | |
with: | |
args: sh .github/scripts/test.sh | |
env: | |
ARTIFACT: ${{ matrix.ARTIFACT }} | |
ARCH: ${{ matrix.ARCH }} | |
GHC_VER: ${{ matrix.GHC_VER }} | |
DISTRO: ${{ matrix.DISTRO }} | |
- if: matrix.ARCH == '64' && matrix.DISTRO == 'Alpine' | |
name: Run test (64 bit linux Alpine) | |
uses: docker://hasufell/alpine-haskell:3.12 | |
with: | |
args: sh .github/scripts/test.sh | |
env: | |
ARTIFACT: ${{ matrix.ARTIFACT }} | |
ARCH: ${{ matrix.ARCH }} | |
GHC_VER: ${{ matrix.GHC_VER }} | |
DISTRO: ${{ matrix.DISTRO }} | |
- if: matrix.DISTRO != 'Alpine' | |
name: Run test (64 bit linux) | |
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/test.sh | |
env: | |
ARTIFACT: ${{ matrix.ARTIFACT }} | |
ARCH: ${{ matrix.ARCH }} | |
GHC_VER: ${{ matrix.GHC_VER }} | |
DISTRO: ${{ matrix.DISTRO }} | |
- if: failure() | |
name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: testfiles | |
path: | | |
./test/ghcup-test/golden/unix/GHCupInfo*json |