diff --git a/.github/workflows/release-ghc-alpine.yaml b/.github/workflows/release-ghc-alpine.yaml index 4e1141d7..bae80339 100644 --- a/.github/workflows/release-ghc-alpine.yaml +++ b/.github/workflows/release-ghc-alpine.yaml @@ -1,17 +1,35 @@ on: push: - branches: - - ekw/SRE-996/release-ghc-alpine tags: - - ghc-alpine/* + - fpic-ghc/* + +env: + AWS_ROLE_TO_ASSUME: "arn:aws:iam::192549843005:role/github_concordium-ghc" + GHC_VERSION: "9.6.6" + BOTTSTRAP_GHC_VERSION: "9.6.4" + +permissions: + id-token: write + contents: read jobs: - release-ghc-alpine: - uses: concordium/.github/.github/workflows/s3-release-workflow.yaml@ekw/SRE-996/s3-artifact - with: - SERVICE_NAME: "ghc-alpine" - BUILD_ARGS: --build-arg BOOTSTRAP_HASKELL_GHC_VERSION="9.4.6" --build-arg GHC_VERSION="9.4.6" - DOCKER_FILE: docker/ghc-alpine.Dockerfile - FILE_NAME: "ghc-9.4.6-x86_64-unknown-linux-integer-gmp.tar.xz" - BUCKET: "s3://static-libraries.concordium.com" - IAM_ROLE: "arn:aws:iam::192549843005:role/github_ghc-alpine" + release-fpic: + runs-on: ubuntu-latest + environment: release + steps: + + - name: aws creds + uses: aws-actions/configure-aws-credentials@v4 + id: creds + with: + aws-region: "eu-west-1" + role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} + role-session-name: ReleaseAlpineGhcSession + + - name: Build and push + run: | + # GHC_VERSION corresponds to the version of GHC that we are building. + # BOOTSTRAP_GHC_VERSION corresponds to the version of GHC that we are using to build GHC_VERSION. + GHC_VERSION="${{ env.GHC_VERSION }}" \ + BOOTSTRAP_GHC_VERSION="${{ env.BOTTSTRAP_GHC_VERSION }}" \ + ./fpic/linux-fpic-ghc-build-and-push.sh diff --git a/docker/ghc-alpine.Dockerfile b/docker/ghc-alpine.Dockerfile index da630154..e560993f 100644 --- a/docker/ghc-alpine.Dockerfile +++ b/docker/ghc-alpine.Dockerfile @@ -5,7 +5,7 @@ ARG BOOTSTRAP_HASKELL_GHC_VERSION WORKDIR / # Install system ghc and dependencies -RUN apk add musl-dev python3 autoconf automake ncurses-dev make file g++ gcc xz git bash wget gmp-dev gmp libffi libffi-dev curl tar xz binutils-gold libc-dev perl pkgconfig +RUN apk add musl-dev python3 autoconf automake ncurses-dev make file g++ xz git bash wget gmp-dev gmp libffi libffi-dev curl ENV BOOTSTRAP_HASKELL_NONINTERACTIVE=1 ENV BOOTSTRAP_HASKELL_NO_UPGRADE=1 RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh @@ -13,6 +13,6 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh # Get GHC source RUN git clone -b ghc-"$GHC_VERSION"-release https://gitlab.haskell.org/ghc/ghc.git/ --recurse-submodules -COPY ../scripts/ghc-alpine-build.sh /ghc-alpine-build.sh -RUN chmod +x /ghc-alpine-build.sh -RUN /ghc-alpine-build.sh +COPY alpine-integer-gmp-ghc.sh /alpine-integer-gmp-ghc.sh +RUN chmod +x /alpine-integer-gmp-ghc.sh +ENTRYPOINT ["./alpine-integer-gmp-ghc.sh"] diff --git a/scripts/ghc-alpine-build.sh b/scripts/ghc-alpine-build.sh index e0550906..b69a6449 100644 --- a/scripts/ghc-alpine-build.sh +++ b/scripts/ghc-alpine-build.sh @@ -5,7 +5,7 @@ set -ex . "$HOME/.ghcup/env" cd ghc/ -cabal install happy-1.20.1.1 alex --install-method=copy +cabal install happy alex --install-method=copy cp ~/.cabal/bin/* /usr/bin # Build GHC @@ -18,4 +18,4 @@ mkdir _build/docs # Copy ghc to out ls _build ls _build/bindist -cp _build/bindist/ghc-"$GHC_VERSION"-x86_64-unknown-linux.tar.xz /build/pkg-root/ghc-"$GHC_VERSION"-x86_64-unknown-linux-integer-gmp.tar.xz +cp _build/bindist/ghc-"$GHC_VERSION"-x86_64-unknown-linux.tar.xz /out/ghc-"$GHC_VERSION"-x86_64-unknown-linux-integer-gmp.tar.xz