Skip to content

Commit

Permalink
Merge pull request #252 from SINTEF/cwa/fix-251-release-workflow
Browse files Browse the repository at this point in the history
Remove pip cache folder.
Update GH Actions.
  • Loading branch information
CasperWA authored Apr 27, 2022
2 parents 140f3ac + 3e184cd commit 9473d55
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 30 deletions.
31 changes: 8 additions & 23 deletions .github/workflows/cd_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up git user
run: |
Expand Down Expand Up @@ -123,12 +123,9 @@ jobs:
# arch: x86_64
# py_minors: 7,8,9,10

env:
CI_PIP_CACHE_DIR: /tmp/pip-cache-${{ matrix.system_type[0] }}${{ matrix.system_type[1] }}_${{ matrix.arch }}

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# This step is necessary because while this is done in the job above,
# this job runs with the original commit SHA and does not have this change.
Expand All @@ -140,18 +137,10 @@ jobs:
shell: bash # Enforce bash shell to make `sed` work also on Windows

- name: Set up Python 3
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Setup cache (for linux builds)
if: startsWith(matrix.os, 'ubuntu')
uses: actions/cache@v2
with:
path: ${{ env.CI_PIP_CACHE_DIR }}
key: pip-cache-${{ matrix.system_type[0] }}${{ matrix.system_type[1] }}-${{ matrix.arch }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: pip-cache-${{ matrix.system_type[0] }}${{ matrix.system_type[1] }}-${{ matrix.arch }}-

- name: Login to GitHub Container Registry
if: startsWith(matrix.os, 'ubuntu')
uses: docker/login-action@v1
Expand All @@ -178,12 +167,8 @@ jobs:
CIBW_MUSLLINUX_X86_64_IMAGE: ${{ env.CONTAINER_REGISTRY }}/sintef/dlite-python-musllinux_1_1_x86_64:latest
CIBW_MUSLLINUX_I686_IMAGE: ${{ env.CONTAINER_REGISTRY }}/sintef/dlite-python-musllinux_1_1_i686:latest

- name: Fix cache dir owner
if: startsWith(matrix.os, 'ubuntu')
run: sudo chown -R $USER ${{ env.CI_PIP_CACHE_DIR }}

- name: Store wheels for publishing
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: wheelhouse/*.whl
Expand All @@ -195,7 +180,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# This step is necessary because while this is done in the job above,
# this job runs with the original commit SHA and does not have this change.
Expand All @@ -206,7 +191,7 @@ jobs:
run: sed -i -E -e "s|^ +VERSION +[0-9.]+$| VERSION ${GITHUB_REF#refs/tags/v}|" CMakeLists.txt

- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: "3.9"

Expand All @@ -225,7 +210,7 @@ jobs:
run: python -m build --no-isolation --sdist python

- name: Store sdist for publishing
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: sdist
path: python/dist/*
Expand All @@ -237,7 +222,7 @@ jobs:

steps:
- name: Retrieve wheels and sdist
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
path: dist

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ jobs:
# py_minors: 7,10

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
with:
python-version: '3.x'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Update submodules
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/container_builds_weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v1

- name: Setup cache
if: github.event_name != 'workflow_dispatch' || fromJSON(github.event.inputs.use_cache)
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .buildx-cache-${{ matrix.system }}${{ matrix.type }}_${{ matrix.arch }}
key: buildx-cache-${{ matrix.system }}${{ matrix.type }}-${{ matrix.arch }}-${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # token provided by actions

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3

- name: Update submodules
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3

- name: Update submodules
run: |
Expand Down

0 comments on commit 9473d55

Please sign in to comment.