Skip to content

Commit

Permalink
Revert to look like jenkins pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilKWarmdahl committed Nov 22, 2024
1 parent 5d82575 commit 23d97b9
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 18 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/release-ghc-alpine.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions docker/ghc-alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ 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

# 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"]
4 changes: 2 additions & 2 deletions scripts/ghc-alpine-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 23d97b9

Please sign in to comment.