Skip to content

Commit

Permalink
feat: adapt CI/CD to new machine (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobPasMue authored Aug 9, 2023
1 parent b1e0f76 commit d77b85b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 22 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
experimental: true

steps:

- uses: actions/checkout@v3

- name: Set up Python
Expand Down Expand Up @@ -118,7 +119,7 @@ jobs:
run: docker pull ${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.docker-image }}

- name: Check location of self-hosted runner and define license server accordingly
if: runner.name == 'pygeometry-ci-1'
if: runner.name == 'pygeometry-ci-1' || runner.name == 'pygeometry-ci-2'
run:
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append

Expand All @@ -132,8 +133,8 @@ jobs:
uses: actions/cache@v3
with:
path: .\tests\integration\image_cache
key: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }}
restore-keys: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}
key: pyvista-image-cache-${{ runner.name }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }}
restore-keys: pyvista-image-cache-${{ runner.name }}-v-${{ env.RESET_IMAGE_CACHE }}

- name: Testing
run: |
Expand All @@ -144,15 +145,15 @@ jobs:
if: always()
uses: actions/upload-artifact@v3
with:
name: integration-test-logs-${{ runner.os }}
name: integration-test-logs-${{ matrix.docker-image }}
path: tests/integration/logs
retention-days: 7

- name: Upload PyVista generated images (cache and results)
if: always()
uses: actions/upload-artifact@v3
with:
name: pytest-pyvista-images-${{ runner.os }}
name: pytest-pyvista-images-${{ matrix.docker-image }}
path: tests/integration/image_cache
retention-days: 7

Expand Down Expand Up @@ -221,7 +222,7 @@ jobs:
run: docker pull $env:ANSRV_GEO_IMAGE_WINDOWS_TAG

- name: Check location of self-hosted runner and define license server accordingly
if: runner.name == 'pygeometry-ci-1'
if: runner.name == 'pygeometry-ci-1' || runner.name == 'pygeometry-ci-2'
run:
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append

Expand Down Expand Up @@ -303,7 +304,6 @@ jobs:
run: |
docker pull ${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.docker-image }}
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.docker-image }}
- name: Checkout repository
uses: actions/checkout@v3

Expand All @@ -327,15 +327,15 @@ jobs:
if: always()
uses: actions/upload-artifact@v3
with:
name: integration-test-logs-${{ runner.os }}
name: integration-test-logs-${{ matrix.docker-image }}
path: tests/integration/logs
retention-days: 7

- name: Upload PyVista generated images (cache and results)
if: always()
uses: actions/upload-artifact@v3
with:
name: pytest-pyvista-images-${{ runner.os }}
name: pytest-pyvista-images-${{ matrix.docker-image }}
path: tests/integration/image_cache
retention-days: 7

Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/docker_test_build.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
name: Docker images - Test build
on:
workflow_dispatch:
pull_request:
paths:
- 'docker/**'
- '.github/workflows/docker_test_build.yml'
push:
branches:
- main
paths:
- 'docker/**'
- '.github/workflows/docker_test_build.yml'
release:
types: [published]

env:
MAIN_PYTHON_VERSION: '3.10'
Expand Down Expand Up @@ -58,7 +47,7 @@ jobs:
docker build -f Dockerfile.windows -t ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }} .
- name: Check location of self-hosted runner and define license server accordingly
if: runner.name == 'pygeometry-ci-1'
if: runner.name == 'pygeometry-ci-1' || runner.name == 'pygeometry-ci-2'
run:
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_docker_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
docker pull $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
- name: Check location of self-hosted runner and define license server accordingly
if: runner.name == 'pygeometry-ci-1'
if: runner.name == 'pygeometry-ci-1' || runner.name == 'pygeometry-ci-2'
run:
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append

Expand Down

0 comments on commit d77b85b

Please sign in to comment.