-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add CI to build, tag and push x86_64 and aarch64 images - add ARCH arg to Dockerfile - build ccache from source as no pre-built aarch64 binary available
- Loading branch information
Showing
3 changed files
with
54 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: CI | ||
on: push | ||
|
||
jobs: | ||
manylinux: | ||
runs-on: ${{ matrix.platform.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- os: "ubuntu-22.04" | ||
arch: "x86_64" | ||
- os: "ubuntu-22.04-arm" | ||
arch: "aarch64" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: docker compose build --build-arg="ARCH=${{ matrix.platform.arch }}" | ||
- if: github.repository == 'spatial-model-editor/sme_manylinux' && github.event_name == 'push' && (startsWith(github.event.ref, 'refs/tags/')) | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- if: github.repository == 'spatial-model-editor/sme_manylinux' && github.event_name == 'push' && (startsWith(github.event.ref, 'refs/tags/')) | ||
run: | | ||
docker compose build . --build-arg="ARCH=${{ARCH}}" -t ghcr.io/spatial-model-editor/manylinux_${{ matrix.platform.arch }}:${{ github.ref_name }} | ||
docker compose push ghcr.io/spatial-model-editor/manylinux_${{ matrix.platform.arch }}:${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,15 @@ | ||
# sme_manylinux_x86_64 | ||
# sme_manylinux | ||
|
||
Docker container for compiling linux x86_64 python wheels for [sme](https://pypi.org/project/sme/) | ||
Docker containers for compiling linux python wheels for [sme](https://pypi.org/project/sme/) | ||
|
||
- Available from <https://ghcr.io/spatial-model-editor/manylinux_x86_64> | ||
- Available from <https://ghcr.io/spatial-model-editor/sme_manylinux> | ||
|
||
- Used by <https://github.com/spatial-model-editor/spatial-model-editor> | ||
|
||
- Based on <https://quay.io/repository/pypa/manylinux_2_28_x86_64> | ||
- Based on | ||
- <https://quay.io/repository/pypa/manylinux_2_28_x86_64> | ||
- <https://quay.io/repository/pypa/manylinux_2_28_aarch64> | ||
|
||
## To update | ||
|
||
Update the Dockerfile, tag the commit with `tagname`, git push, then build and push the docker container: | ||
|
||
```bash | ||
docker build . -t ghcr.io/spatial-model-editor/manylinux_x86_64:tagname | ||
docker push ghcr.io/spatial-model-editor/manylinux_x86_64:tagname | ||
``` | ||
|
||
where `tagname` is today's date in the form `YYYY.MM.DD` | ||
|
||
## Note | ||
|
||
Would be cleaner to have a github action that builds the container on each tagged commit, as we do for sme_deps etc. | ||
|
||
Currently not doing this for convenience, as the docker build would take a long time to run on CI. | ||
To release new images, tag the commit with `YYYY.MM.DD` |