09f95c9127
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
107 lines
2.8 KiB
YAML
107 lines
2.8 KiB
YAML
name: OCCT FFI Unit Tests
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
on:
|
|
push:
|
|
branches: [master, dev-occt**, dev-ffi**]
|
|
paths:
|
|
- "src/occt/**"
|
|
- "src/ffi/**"
|
|
- "tests/occt/**"
|
|
- "tests/*.rs"
|
|
- "ci/occt.Dockerfile"
|
|
- "ci/scripts/occt.sh"
|
|
- "ci/ffi.Dockerfile"
|
|
- "ci/scripts/ffi.sh"
|
|
- ".github/workflows/occt-ffi-unit-test.yml"
|
|
- "./CMakeLists.txt"
|
|
- "Cargo.toml"
|
|
- "Cargo.lock"
|
|
- "build.rs"
|
|
pull_request:
|
|
branches: [master, dev-occt, dev-ffi]
|
|
paths:
|
|
- "src/occt/**"
|
|
- "src/ffi/**"
|
|
- "tests/occt/**"
|
|
- "tests/*.rs"
|
|
- "ci/occt.Dockerfile"
|
|
- "ci/scripts/occt.sh"
|
|
- "ci/ffi.Dockerfile"
|
|
- "ci/scripts/ffi.sh"
|
|
- ".github/workflows/occt-ffi-unit-test.yml"
|
|
- "./CMakeLists.txt"
|
|
- "Cargo.toml"
|
|
- "Cargo.lock"
|
|
- "build.rs"
|
|
|
|
jobs:
|
|
build-occt:
|
|
name: OCCT
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Make scripts executable
|
|
run: chmod +x ./ci/scripts/occt.sh
|
|
|
|
- name: Build OCCT and run tests in Docker
|
|
run: ./ci/scripts/occt.sh --unit-testing
|
|
|
|
- name: Tag and push OCCT image
|
|
if: github.event_name != 'pull_request'
|
|
run: |
|
|
docker tag occt-build:latest ghcr.io/${{ github.repository }}/occt-build:latest
|
|
docker push ghcr.io/${{ github.repository }}/occt-build:latest
|
|
|
|
build-ffi:
|
|
name: FFI
|
|
runs-on: ubuntu-24.04
|
|
needs: build-occt
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Pull and tag OCCT image
|
|
run: |
|
|
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
|
|
run: chmod +x ./ci/scripts/ffi.sh
|
|
|
|
- name: Build and test FFI in Docker
|
|
run: ./ci/scripts/ffi.sh --tests
|
|
|
|
- name: Tag and push FFI image
|
|
if: github.event_name != 'pull_request'
|
|
run: |
|
|
docker tag ffi-build:latest ghcr.io/${{ github.repository }}/ffi-build:latest
|
|
docker push ghcr.io/${{ github.repository }}/ffi-build:latest
|