ci: fix action error with pulling OCCT image
This commit is contained in:
@@ -63,8 +63,8 @@ jobs:
|
|||||||
- name: Tag and push OCCT image
|
- name: Tag and push OCCT image
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
docker tag occt-builder:latest ghcr.io/${{ github.repository }}/occt-builder:latest
|
docker tag occt-build:latest ghcr.io/${{ github.repository }}/occt-build:latest
|
||||||
docker push ghcr.io/${{ github.repository }}/occt-builder:latest
|
docker push ghcr.io/${{ github.repository }}/occt-build:latest
|
||||||
|
|
||||||
build-ffi:
|
build-ffi:
|
||||||
name: FFI
|
name: FFI
|
||||||
@@ -79,16 +79,16 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to GitHub Container Registry
|
- name: Log in to GitHub Container Registry
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Pull OCCT image or build locally
|
- name: Pull and tag OCCT image
|
||||||
run: |
|
run: |
|
||||||
docker pull ghcr.io/${{ github.repository }}/occt-builder:latest || ./ci/scripts/occt.sh --build-only
|
docker pull ghcr.io/${{ github.repository }}/occt-build:latest
|
||||||
|
docker tag ghcr.io/${{ github.repository }}/occt-build:latest occt-build:latest
|
||||||
|
|
||||||
- name: Make scripts executable
|
- name: Make scripts executable
|
||||||
run: chmod +x ./ci/scripts/ffi.sh
|
run: chmod +x ./ci/scripts/ffi.sh
|
||||||
@@ -99,5 +99,5 @@ jobs:
|
|||||||
- name: Tag and push FFI image
|
- name: Tag and push FFI image
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
docker tag ffi-builder:latest ghcr.io/${{ github.repository }}/ffi-builder:latest
|
docker tag ffi-build:latest ghcr.io/${{ github.repository }}/ffi-build:latest
|
||||||
docker push ghcr.io/${{ github.repository }}/ffi-builder:latest
|
docker push ghcr.io/${{ github.repository }}/ffi-build:latest
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ by the Free Software Foundation, either version 3 of the License, or
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is licensed under the GNU Affero General Public License v3.0 - see [LICENSE.txt](LICENSE.txt) file for details.
|
This project is licensed under the [GNU Affero General Public License v3.0](https://spdx.org/licenses/AGPL-3.0-or-later.html) - see [LICENSE.txt](LICENSE.txt) file for details.
|
||||||
|
|
||||||
## Third-Party Dependencies
|
## Third-Party Dependencies
|
||||||
|
|
||||||
This software makes use of facilities provided by **Open CASCADE Technology** (OCCT), which is licensed under the GNU LGPL version 2.1 with the following exception:
|
This software makes use of facilities provided by **Open CASCADE Technology** (OCCT), which is licensed under the [GNU Lesser General Public License v2.1](https://spdx.org/licenses/LGPL-2.1-only.html) with the following exception:
|
||||||
|
|
||||||
### Open CASCADE Exception (version 1.0)
|
### Open CASCADE Exception (version 1.0)
|
||||||
> The object code (i.e. not a source) form of a "work that uses the Library"
|
> The object code (i.e. not a source) form of a "work that uses the Library"
|
||||||
|
|||||||
+6
-3
@@ -1,4 +1,7 @@
|
|||||||
FROM occt-builder:latest AS ffi-base
|
FROM occt-build:latest AS occt-local
|
||||||
|
FROM ghcr.io/erickahmed/arc-core/occt-build:latest AS occt-ghcr
|
||||||
|
FROM occt-local AS occt-selected
|
||||||
|
FROM occt-selected AS ffi-base
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
@@ -26,8 +29,8 @@ RUN apt-get update && apt-get install -y \
|
|||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
|
|
||||||
COPY --from=occt-builder:latest /usr/local /usr/local
|
COPY --from=occt-selected /usr/local /usr/local
|
||||||
COPY --from=occt-builder:latest /app/build /app/occt-build
|
COPY --from=occt-selected /app/build /app/occt-build
|
||||||
COPY --from=ffi-base /app /app
|
COPY --from=ffi-base /app /app
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
+6
-1
@@ -1,3 +1,8 @@
|
|||||||
|
# Builds Open CASCADE Technology (OCCT) v7.9.2
|
||||||
|
# Licensed under LGPL-2.1-only with OCCT Exception v1.0
|
||||||
|
# Source: https://github.com/Open-Cascade-SAS/OCCT/tree/c5f20409c52bf8f658314d205a0e5d6f0be0969c
|
||||||
|
|
||||||
|
# Base builder
|
||||||
FROM ubuntu:24.04 AS occt-base
|
FROM ubuntu:24.04 AS occt-base
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
@@ -14,7 +19,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
RUN git clone https://github.com/Open-Cascade-SAS/OCCT.git opencascade
|
RUN git clone https://github.com/Open-Cascade-SAS/OCCT.git opencascade
|
||||||
WORKDIR /opencascade
|
WORKDIR /opencascade
|
||||||
RUN rm -rf /opencascade/build && mkdir build
|
RUN rm -rf /opencascade/build && mkdir build
|
||||||
RUN git checkout V7_9_2 -b OCCT-792
|
RUN git checkout c5f20409c52bf8f658314d205a0e5d6f0be0969c #Tag V7_9_2
|
||||||
RUN mkdir -p build
|
RUN mkdir -p build
|
||||||
WORKDIR /opencascade/build
|
WORKDIR /opencascade/build
|
||||||
|
|
||||||
|
|||||||
+18
-4
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
IMAGE_NAME="ffi-builder:latest"
|
IMAGE_NAME="ffi-build:latest"
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
PROJECT_PATH="$(cd "$SCRIPT_DIR/../../" && pwd)"
|
PROJECT_PATH="$(cd "$SCRIPT_DIR/../../" && pwd)"
|
||||||
DOCKERFILE_PATH="$SCRIPT_DIR/../ffi.Dockerfile"
|
DOCKERFILE_PATH="$SCRIPT_DIR/../ffi.Dockerfile"
|
||||||
@@ -11,13 +11,27 @@ if [[ "${1-}" == "--tests" ]]; then
|
|||||||
RUN_UNIT_TESTS=true
|
RUN_UNIT_TESTS=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Try to understand where tf are we
|
||||||
|
if [[ -n "${GITHUB_REPOSITORY-}" ]]; then
|
||||||
|
BASE_IMAGE="ghcr.io/$GITHUB_REPOSITORY/occt-build:latest"
|
||||||
|
echo "Using GHCR image: $BASE_IMAGE"
|
||||||
|
docker pull "$BASE_IMAGE" || true
|
||||||
|
else
|
||||||
|
BASE_IMAGE="occt-build:latest"
|
||||||
|
echo "Using local image: $BASE_IMAGE"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Building base image..."
|
echo "Building base image..."
|
||||||
docker build --target ffi-base -f "$DOCKERFILE_PATH" -t "$IMAGE_NAME" "$PROJECT_PATH"
|
docker build --target ffi-base -f "$DOCKERFILE_PATH" -t "$IMAGE_NAME" \
|
||||||
|
--build-arg BASE_IMAGE="$BASE_IMAGE" \
|
||||||
|
"$PROJECT_PATH"
|
||||||
|
|
||||||
if [ "$RUN_UNIT_TESTS" = true ]; then
|
if [ "$RUN_UNIT_TESTS" = true ]; then
|
||||||
echo "Building unit-testing stage..."
|
echo "Building unit-testing stage..."
|
||||||
docker build --target ffi-unit-testing -f "$DOCKERFILE_PATH" -t "$IMAGE_NAME" "$PROJECT_PATH"
|
docker build --target ffi-unit-testing -f "$DOCKERFILE_PATH" -t "$IMAGE_NAME" \
|
||||||
|
--build-arg BASE_IMAGE="$BASE_IMAGE" \
|
||||||
|
"$PROJECT_PATH"
|
||||||
|
|
||||||
echo "Running tests..."
|
echo "Running tests..."
|
||||||
docker run --rm -it "$IMAGE_NAME" cargo test
|
docker run --rm "$IMAGE_NAME" cargo test --verbose
|
||||||
fi
|
fi
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
IMAGE_NAME="occt-builder:latest"
|
IMAGE_NAME="occt-build:latest"
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
PROJECT_PATH="$(cd "$SCRIPT_DIR/../../" && pwd)"
|
PROJECT_PATH="$(cd "$SCRIPT_DIR/../../" && pwd)"
|
||||||
DOCKERFILE_PATH="$SCRIPT_DIR/../occt.Dockerfile"
|
DOCKERFILE_PATH="$SCRIPT_DIR/../occt.Dockerfile"
|
||||||
|
|||||||
Reference in New Issue
Block a user