-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): use Ubuntu 24.04 as base image, update dependencies #422
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,13 @@ name: LAPIS-SILO | |
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
inputs: | ||
build_arm: | ||
type: boolean | ||
description: "Build for ARM as well" | ||
default: false | ||
required: false | ||
|
||
concurrency: | ||
group: ci-${{ github.ref }} | ||
|
@@ -11,6 +18,7 @@ env: | |
DOCKER_DEPENDENCY_IMAGE_NAME: ghcr.io/genspectrum/lapis-silo-dependencies | ||
DOCKER_LINTER_DEPENDENCY_IMAGE_NAME: ghcr.io/genspectrum/lapis-silo-linter-dependencies | ||
DOCKER_IMAGE_NAME: ghcr.io/genspectrum/lapis-silo | ||
BUILD_ARM: ${{ github.event.inputs.build_arm || github.ref == 'refs/heads/main' }} | ||
|
||
jobs: | ||
formatting-check: | ||
|
@@ -19,15 +27,15 @@ jobs: | |
strategy: | ||
matrix: | ||
path: | ||
- check: 'src' | ||
- check: 'include' | ||
exclude: '(PerfEvent.hpp)' | ||
- check: "src" | ||
- check: "include" | ||
exclude: "(PerfEvent.hpp)" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run clang-format style check | ||
uses: jidicula/[email protected] | ||
with: | ||
clang-format-version: '17' | ||
clang-format-version: "17" | ||
check-path: ${{ matrix.path['check'] }} | ||
exclude-regex: ${{ matrix.path['exclude'] }} | ||
|
||
|
@@ -39,8 +47,17 @@ jobs: | |
|
||
- name: Generate dependency files hash | ||
id: files-hash | ||
run: | | ||
DIR_HASH=$(echo -n ${{ hashFiles('conanfile.py', 'conanprofile.docker', '.github/workflows/ci.yml', './Dockerfile_linter_dependencies') }}) | ||
run: |- | ||
DIR_HASH=$( | ||
echo -n ${{ | ||
hashFiles( | ||
'conanfile.py', | ||
'conanprofile.docker', | ||
'.github/workflows/ci.yml', | ||
'./Dockerfile_linter_dependencies' | ||
) | ||
}} | ||
) | ||
echo "DIR_HASH=$DIR_HASH" >> $GITHUB_ENV | ||
|
||
- name: Docker metadata | ||
|
@@ -91,8 +108,17 @@ jobs: | |
|
||
- name: Generate dependency files hash | ||
id: files-hash | ||
run: | | ||
DIR_HASH=$(echo -n ${{ hashFiles('conanfile.py', 'conanprofile.docker', '.github/workflows/ci.yml', './Dockerfile_linter_dependencies') }}) | ||
run: |- | ||
DIR_HASH=$( | ||
echo -n ${{ | ||
hashFiles( | ||
'conanfile.py', | ||
'conanprofile.docker', | ||
'.github/workflows/ci.yml', | ||
'./Dockerfile_linter_dependencies' | ||
) | ||
}} | ||
) | ||
echo "DIR_HASH=$DIR_HASH" >> $GITHUB_ENV | ||
|
||
- name: Set up Docker Buildx | ||
|
@@ -119,9 +145,22 @@ jobs: | |
|
||
- name: Generate dependency files hash | ||
id: files-hash | ||
run: | | ||
DIR_HASH=$(echo -n ${{ hashFiles('conanfile.py', 'conanprofile.docker', '.github/workflows/ci.yml', './Dockerfile_dependencies') }}) | ||
echo "DIR_HASH=$DIR_HASH" >> $GITHUB_ENV | ||
run: |- | ||
DIR_HASH=$( | ||
echo -n ${{ | ||
hashFiles( | ||
'conanfile.py', | ||
'conanprofile.docker', | ||
'conanprofile.docker_arm', | ||
'.github/workflows/ci.yml', | ||
'./Dockerfile_dependencies' | ||
) | ||
}} | ||
) | ||
if [ $BUILD_ARM == 'true' ]; then | ||
echo "NONARM_HASH=$DIR_HASH" >> $GITHUB_ENV | ||
fi | ||
echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM == 'true' && '-arm' || '' }}" >> $GITHUB_ENV | ||
|
||
- name: Docker metadata | ||
id: dockerMetadata | ||
|
@@ -132,6 +171,7 @@ jobs: | |
type=ref,event=branch | ||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | ||
type=raw,value=${{ env.DIR_HASH }} | ||
type=raw,value=${{ env.NONARM_HASH }},enable=${{ env.BUILD_ARM }} | ||
type=sha,prefix=commit- | ||
|
||
- name: Login to GitHub Container Registry | ||
|
@@ -161,7 +201,7 @@ jobs: | |
tags: ${{ steps.dockerMetadata.outputs.tags }} | ||
cache-from: type=gha,ref=builder-image-cache-${{ hashFiles('conanfile.py', 'Dockerfile') }} | ||
cache-to: type=gha,mode=min,ref=builder-image-cache-${{ hashFiles('conanfile.py', 'Dockerfile') }} | ||
platforms: linux/amd64,linux/arm64 | ||
platforms: ${{ env.BUILD_ARM == 'true' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} | ||
|
||
dockerImageUnitTests: | ||
name: Build Docker Image and Run Unit Tests | ||
|
@@ -174,9 +214,19 @@ jobs: | |
|
||
- name: Generate dependency files hash | ||
id: files-hash | ||
run: | | ||
DIR_HASH=$(echo -n ${{ hashFiles('conanfile.py', 'conanprofile.docker', '.github/workflows/ci.yml', './Dockerfile_dependencies') }}) | ||
echo "DIR_HASH=$DIR_HASH" >> $GITHUB_ENV | ||
run: |- | ||
DIR_HASH=$( | ||
echo -n ${{ | ||
hashFiles( | ||
'conanfile.py', | ||
'conanprofile.docker', | ||
'conanprofile.docker_arm', | ||
'.github/workflows/ci.yml', | ||
'./Dockerfile_dependencies' | ||
) | ||
}} | ||
) | ||
echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM == 'true' && '-arm' || '' }}" >> $GITHUB_ENV | ||
|
||
- name: Docker metadata | ||
id: dockerMetadata | ||
|
@@ -233,10 +283,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
preprocessing-docker-compose: [ | ||
docker-compose-for-tests-preprocessing-from-tsv.yml, | ||
docker-compose-for-tests-preprocessing-from-ndjson.yml | ||
] | ||
preprocessing-docker-compose: | ||
[ | ||
docker-compose-for-tests-preprocessing-from-tsv.yml, | ||
docker-compose-for-tests-preprocessing-from-ndjson.yml, | ||
] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -274,4 +325,4 @@ jobs: | |
SILO_IMAGE: ${{ steps.dockerMetadata.outputs.tags }} | ||
|
||
- name: Run Tests | ||
run: cd endToEndTests && SILO_URL=localhost:8080 npm run test | ||
run: cd endToEndTests && SILO_URL=localhost:8080 npm run test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,8 @@ conanprofile | |
*.out | ||
*.app | ||
|
||
# Debug files | ||
debug.duckdb | ||
|
||
**/output/ | ||
**/logs/ | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
FROM alpine:3.18 | ||
FROM ubuntu:24.04 | ||
|
||
ARG TARGETPLATFORM | ||
|
||
RUN apk update && apk add --no-cache py3-pip \ | ||
build-base=0.5-r3 \ | ||
cmake=3.26.5-r0 \ | ||
bash=5.2.15-r5 \ | ||
linux-headers=6.3-r0 \ | ||
boost-build=1.82.0-r0 \ | ||
libtbb=2021.9.0-r0 | ||
WORKDIR /src | ||
|
||
RUN pip install conan==2.0.17 | ||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
cmake \ | ||
pipx \ | ||
build-essential \ | ||
gcc \ | ||
g++ \ | ||
&& apt-get clean \ | ||
&& apt-get autoremove --purge -y | ||
|
||
ENV PATH="/root/.local/bin:$PATH" | ||
RUN pipx install conan --pip-args="--no-cache-dir" --system-site-packages | ||
|
||
WORKDIR /src | ||
COPY conanfile.py conanprofile.docker conanprofile.docker_arm ./ | ||
|
||
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ | ||
mv conanprofile.docker_arm conanprofile; \ | ||
mv conanprofile.docker_arm conanprofile; \ | ||
else \ | ||
mv conanprofile.docker conanprofile; \ | ||
mv conanprofile.docker conanprofile; \ | ||
fi | ||
|
||
RUN conan install . --build=missing --profile ./conanprofile --profile:build ./conanprofile --output-folder=build | ||
RUN conan install . --build=missing --profile ./conanprofile --profile:build ./conanprofile --output-folder=build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,36 @@ | ||
FROM ubuntu:22.04 | ||
FROM ubuntu:24.04 | ||
|
||
ARG TARGETPLATFORM | ||
|
||
WORKDIR /src | ||
|
||
RUN apt update \ | ||
&& apt install -y \ | ||
cmake=3.22.1-1ubuntu1.22.04.2 \ | ||
python3-pip=22.0.2+dfsg-1ubuntu0.4 \ | ||
software-properties-common=0.99.22.9 \ | ||
wget=1.21.2-2ubuntu1 \ | ||
gnupg=2.2.27-3ubuntu2.1 \ | ||
lsb-release=11.1.0ubuntu4 \ | ||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
cmake \ | ||
build-essential \ | ||
gcc \ | ||
g++ \ | ||
software-properties-common \ | ||
wget \ | ||
gnupg \ | ||
lsb-release \ | ||
pipx \ | ||
&& wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc \ | ||
&& add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main' \ | ||
&& apt install -y clang-tidy-19 | ||
&& add-apt-repository 'deb http://apt.llvm.org/mantic/ llvm-toolchain-mantic main' \ | ||
&& apt-get update \ | ||
&& apt-get install -y clang-tidy-19 \ | ||
&& apt-get clean \ | ||
&& apt-get autoremove --purge -y | ||
|
||
ENV PATH="/root/.local/bin:$PATH" | ||
RUN pipx install conan --pip-args="--no-cache-dir" --system-site-packages | ||
|
||
RUN pip install conan==2.0.17 | ||
COPY conanfile.py conanprofile.docker conanprofile.docker_arm ./ | ||
|
||
COPY conanfile.py conanprofile.docker ./ | ||
RUN mv conanprofile.docker conanprofile | ||
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ | ||
mv conanprofile.docker_arm conanprofile; \ | ||
else \ | ||
mv conanprofile.docker conanprofile; \ | ||
fi | ||
|
||
RUN conan install . --build=missing --profile ./conanprofile --profile:build ./conanprofile --output-folder=build -s build_type=Debug |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[settings] | ||
os=Macos | ||
arch=armv8 | ||
compiler=gcc | ||
compiler.libcxx=libstdc++11 | ||
compiler.version=12.2 | ||
build_type=Release | ||
[options] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <optional> | ||
#include <string> | ||
#include <string_view> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@corneliusroemer, I think that it is better to use small images with as few dependencies as possible to reduce the surface for potential security vulnerabilities.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no strong feelings about this. But I have it on my TO-DO list now, to benchmark the actual images against one another in the next weeks!