Skip to content

Commit

Permalink
Upgrade base image to ubuntu 22
Browse files Browse the repository at this point in the history
  • Loading branch information
4eUeP committed Nov 2, 2023
1 parent b03a71e commit 149340e
Show file tree
Hide file tree
Showing 16 changed files with 213 additions and 152 deletions.
40 changes: 10 additions & 30 deletions .github/workflows/ci_ghc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,11 @@ jobs:
build-ghc-haskell:
runs-on: ubuntu-latest
needs: init-ghc-haskell
name: build-ghc-haskell (${{ matrix.platform }}, ${{ matrix.ghc }})
name: build-ghc-${{ matrix.ghc }}
if: ${{ needs.init-ghc-haskell.outputs.skip == 'false' }}
strategy:
matrix:
include:
# FIXME: disable arm64 builds since it's too slow on ci
# platform: linux/amd64,linux/arm64
- platform: linux/amd64
ghc: 8.10.7
tag: 8.10.7:8.10

- platform: linux/amd64
ghc: 9.2.7
tag: 9.2.7:9.2:latest

- platform: linux/amd64
ghc: 9.4.5
tag: 9.4.5:9.4
ghc: [ghc810, ghc902, ghc904]

steps:
- uses: actions/checkout@v3
Expand All @@ -57,21 +44,14 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build
uses: ./.github/actions/docker-haskell
with:
image-name: ghcr.io/hstreamdb/ghc
dockerfile: dockerfiles/ghc_from_haskell
platform: ${{ matrix.platform }}
tag: ${{ matrix.tag }}
kargs-key: GHC
kargs-value: ${{ matrix.ghc }}
- name: build & push images
run: |
HS_DIR='.' ./build.sh build_${{ matrix.ghc }}
HS_DIR='.' ./build.sh push_${{ matrix.ghc }}
HS_DIR='.' ./build.sh push_${{ matrix.ghc }}_manifest
if [ "${{ matrix.ghc }}" == "ghc902" ]; then
HS_DIR='.' ./build.sh push_ghc_latest_manifest
fi
# ----------------------
# XXX: Unused
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/ci_hsthrift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,21 @@ jobs:
outputs:
skip: ${{ steps.check-if-skip.outputs.skip }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: check-if-skip
run: |
if sha256sum -c checksum/hsthrift.sha256sum --status; then
echo "::set-output name=skip::true"
else
echo "::set-output name=skip::false"
fi
- name: check-if-skip
id: check-if-skip
uses: ./.github/actions/check-if-skip
with:
checksum-file: checksum/hsthrift.sha256sum

build:
needs: init
if: ${{ needs.init.outputs.skip == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: "recursive"

Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ RUN apt-get update && \
bash-completion \
python3 \
gdb \
golang-1.16-go \
golang \
librdkafka-dev \
libstatgrab-dev && \
ln -s /usr/lib/go-1.16/bin/go /usr/bin/go && \
ln -s /usr/lib/go-1.16/bin/gofmt /usr/bin/gofmt && \
grep -wq '^source /etc/profile.d/bash_completion.sh' /etc/bash.bashrc \
|| echo 'source /etc/profile.d/bash_completion.sh' >> /etc/bash.bashrc && \
rm -rf /var/lib/apt/lists/* && \
Expand All @@ -48,7 +47,7 @@ COPY --from=ghcr.io/hstreamdb/grpc:1.54.2 /usr/local/lib/ /usr/local/lib/
COPY requirements/ /tmp/requirements/
RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
$(cat /tmp/requirements/ubuntu-focal.txt) && \
$(cat /tmp/requirements/ubuntu-jammy.txt) && \
rm -rf /tmp/requirements && rm -rf /var/lib/apt/lists/* && apt-get clean

COPY --from=ld_client /usr/local/lib/ /usr/local/lib/
Expand Down
Loading

0 comments on commit 149340e

Please sign in to comment.