From 7e29b7cc7fe9d6e2214a0c01661eb608fd450020 Mon Sep 17 00:00:00 2001 From: "Artiom N." Date: Fri, 22 Nov 2024 01:08:54 +0300 Subject: [PATCH 1/6] Build script fix: #18 --- CMakeLists.txt | 1 + knp/base-framework/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 167bb4a2..68237e9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -302,6 +302,7 @@ add_third_party("gh:BlueBrain/HighFive@2.9.0" add_third_party("gh:p-ranav/csv2@0.1" OPTIONS "CSV2_BUILD_TESTS OFF" + "CSV2_TEST OFF" "CSV2_SAMPLES OFF") add_third_party("gh:intel/pcm" diff --git a/knp/base-framework/CMakeLists.txt b/knp/base-framework/CMakeLists.txt index e4f52f8c..2ee1af22 100644 --- a/knp/base-framework/CMakeLists.txt +++ b/knp/base-framework/CMakeLists.txt @@ -75,7 +75,7 @@ knp_add_library("${PROJECT_NAME}-core" ${${PROJECT_NAME}_headers} ALIAS KNP::BaseFramework::Core LINK_PRIVATE - spdlog::spdlog Boost::headers Boost::filesystem #[[RapidJSON]] HighFive ${HDF5_LIB} csv2 + spdlog::spdlog Boost::headers Boost::filesystem HighFive ${HDF5_LIB} csv2 # RapidJSON # Hack to build with CLang. ${ADD_LIBS} LINK_PUBLIC From b9e49fc8987e8e60ba2bb47b927a5120ef64d759 Mon Sep 17 00:00:00 2001 From: "Artiom N." Date: Fri, 22 Nov 2024 13:52:36 +0300 Subject: [PATCH 2/6] ARM Docker image build add: #16 --- .github/workflows/docker-build-image.yml | 24 +++++++++++++++++++----- docker/build-image/Dockerfile | 6 +++--- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-build-image.yml b/.github/workflows/docker-build-image.yml index 4d6f1cfb..8063ae0e 100644 --- a/.github/workflows/docker-build-image.yml +++ b/.github/workflows/docker-build-image.yml @@ -15,22 +15,36 @@ on: - '.github/workflows/docker-build-image.yml' jobs: - build: + docker: runs-on: ubuntu-latest steps: - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + - name: Set up Docker + uses: crazy-max/ghaction-setup-docker@v3 + with: + daemon-config: | + { + "debug": true, + "features": { + "containerd-snapshotter": true + } + } + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ vars.DOCKERHUB_LOGIN }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - uses: actions/checkout@v4 + - name: Build and push the Docker image for KNP build uses: docker/build-push-action@v6 with: + platforms: linux/amd64,linux/arm64 context: "{{defaultContext}}:docker/build-image" + load: true push: true - tags: ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image:latest + tags: kasperskydh/knp-build-image:latest timeout-minutes: 180 continue-on-error: false diff --git a/docker/build-image/Dockerfile b/docker/build-image/Dockerfile index bc1bb57e..e1ff48bf 100644 --- a/docker/build-image/Dockerfile +++ b/docker/build-image/Dockerfile @@ -141,9 +141,9 @@ RUN \ && chmod +x ${DESTINATION} \ && ln -sf ${DESTINATION} /usr/bin/docker-compose -RUN \ - wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb && dpkg -i libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb && rm libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb \ - && sed -i 's/openssl_conf = openssl_init/#openssl_conf = openssl_init/g' /etc/ssl/openssl.cnf +#RUN \ +# wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb && dpkg -i libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb && rm libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb \ +# && sed -i 's/openssl_conf = openssl_init/#openssl_conf = openssl_init/g' /etc/ssl/openssl.cnf # COPY "${OCLINT_FILE}" . RUN \ From 803c5a88cca196b189041ba413b27ceb473a3225 Mon Sep 17 00:00:00 2001 From: "Artiom N." Date: Wed, 27 Nov 2024 16:48:47 +0300 Subject: [PATCH 3/6] Docker hub login and password set from variables: #16 --- .github/workflows/docker-build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-image.yml b/.github/workflows/docker-build-image.yml index 8063ae0e..7a8b6528 100644 --- a/.github/workflows/docker-build-image.yml +++ b/.github/workflows/docker-build-image.yml @@ -45,6 +45,6 @@ jobs: context: "{{defaultContext}}:docker/build-image" load: true push: true - tags: kasperskydh/knp-build-image:latest + tags: ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image:latest timeout-minutes: 180 continue-on-error: false From ee05f6f8ff67db1188facdfe2d5cb79877b0d987 Mon Sep 17 00:00:00 2001 From: "Artiom N." Date: Thu, 28 Nov 2024 18:22:52 +0300 Subject: [PATCH 4/6] Variables fix: #17 --- .github/workflows/docker-build-image.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-build-image.yml b/.github/workflows/docker-build-image.yml index 7a8b6528..f3667de7 100644 --- a/.github/workflows/docker-build-image.yml +++ b/.github/workflows/docker-build-image.yml @@ -35,16 +35,18 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v3 with: - username: ${{ vars.DOCKERHUB_LOGIN }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - + username: $DOCKERHUB_LOGIN + password: $DOCKERHUB_TOKEN - name: Build and push the Docker image for KNP build uses: docker/build-push-action@v6 + env: + DOCKERHUB_LOGIN: ${{ vars.DOCKERHUB_LOGIN }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} with: platforms: linux/amd64,linux/arm64 context: "{{defaultContext}}:docker/build-image" load: true push: true - tags: ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image:latest + tags: $DOCKERHUB_LOGIN/knp-build-image:latest timeout-minutes: 180 continue-on-error: false From ab46ca8fc8ea386260b80cfecd3a70f6571adb96 Mon Sep 17 00:00:00 2001 From: "Artiom N." Date: Thu, 28 Nov 2024 18:25:57 +0300 Subject: [PATCH 5/6] Variables returned: #17 --- .github/workflows/docker-build-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-image.yml b/.github/workflows/docker-build-image.yml index f3667de7..dc4a8fe1 100644 --- a/.github/workflows/docker-build-image.yml +++ b/.github/workflows/docker-build-image.yml @@ -35,8 +35,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v3 with: - username: $DOCKERHUB_LOGIN - password: $DOCKERHUB_TOKEN + username: ${{ vars.DOCKERHUB_LOGIN }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push the Docker image for KNP build uses: docker/build-push-action@v6 env: From 466559756945bac63470832d4a79e7f0dc426ed1 Mon Sep 17 00:00:00 2001 From: "Artiom N." Date: Thu, 28 Nov 2024 18:28:22 +0300 Subject: [PATCH 6/6] Tag fix: #17 --- .github/workflows/docker-build-image.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/docker-build-image.yml b/.github/workflows/docker-build-image.yml index dc4a8fe1..a0cbe51e 100644 --- a/.github/workflows/docker-build-image.yml +++ b/.github/workflows/docker-build-image.yml @@ -39,14 +39,11 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push the Docker image for KNP build uses: docker/build-push-action@v6 - env: - DOCKERHUB_LOGIN: ${{ vars.DOCKERHUB_LOGIN }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} with: platforms: linux/amd64,linux/arm64 context: "{{defaultContext}}:docker/build-image" load: true push: true - tags: $DOCKERHUB_LOGIN/knp-build-image:latest + tags: ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image:latest timeout-minutes: 180 continue-on-error: false