Skip to content

Commit a4b57ba

Browse files
committed
add tests and release for arm, simplify Dockerfile
1 parent 5383146 commit a4b57ba

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

.github/workflows/releases.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ jobs:
1717
runs-on: ${{ matrix.os }}
1818
strategy:
1919
matrix:
20-
os: [ubuntu-22.04, macos-13, macos-14]
20+
os:
21+
- ubuntu-22.04
22+
- macos-13
23+
- macos-14
24+
- ubuntu-22.04-arm
2125

2226
steps:
2327
- name: Checkout sources
@@ -104,6 +108,7 @@ jobs:
104108
fi
105109
;;
106110
arm64) export TARGETS="apple-m1" ;;
111+
aarch64) export TARGETS="aarch64" ;;
107112
*) echo "unknown arch (uname -m) $ARCH"; exit 1 ;;
108113
esac
109114
@@ -196,6 +201,7 @@ jobs:
196201
tar xvf *-darwin-apple-m1-python.tar.gz -C for_pypi/ --wildcards "*.whl"
197202
tar xvf *-darwin-x86-64-python.tar.gz -C for_pypi/ --wildcards "*.whl"
198203
tar xvf *-linux-x86-64-python.tar.gz -C for_pypi/ --wildcards "*.whl"
204+
tar xvf *-linux-aarch64-python.tar.gz -C for_pypi/ --wildcards "*.whl"
199205
200206
- name: Publish package to PyPI
201207
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/run-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- ubuntu-22.04
2929
- macos-13
3030
- macos-14
31+
- ubuntu-22.04-arm
3132
rust:
3233
- ver: nightly
3334
examples: false

Dockerfile

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
# cross-platform, cpu-only dockerfile for demoing MWA software stack
33
# on amd64, arm64
44
# ref: https://docs.docker.com/build/building/multi-platform/
5-
# ARG BASE_IMG="ubuntu:20.04"
6-
# HACK: newer python breaks on old ubuntu
7-
ARG BASE_IMG="python:3.11-bookworm"
8-
FROM ${BASE_IMG} as base
5+
FROM python:3.11-slim-bookworm AS base
96

107
# Suppress perl locale errors
118
ENV LC_ALL=C
@@ -54,26 +51,16 @@ RUN mkdir -m755 $RUSTUP_HOME $CARGO_HOME && ( \
5451
)
5552

5653
# install python prerequisites
57-
# - newer pip needed for mwalib maturin install
54+
# - newer pip needed for maturin install
5855
# - other versions pinned to avoid issues with numpy==2
59-
ARG SSINS_BRANCH=master
60-
ARG MWAQA_BRANCH=dev
6156
RUN python -m pip install --no-cache-dir \
6257
importlib_metadata==8.2.0 \
6358
maturin[patchelf]==1.7.0 \
6459
pip==24.2 \
6560
;
6661

67-
ARG MWALIB_BRANCH=v1.5.0
68-
RUN git clone --depth 1 --branch=${MWALIB_BRANCH} https://github.com/MWATelescope/mwalib.git /mwalib && \
69-
cd /mwalib && \
70-
maturin build --release --features=python && \
71-
python -m pip install $(ls -1 target/wheels/*.whl | tail -n 1) && \
72-
cd / && \
73-
rm -rf /mwalib ${CARGO_HOME}/registry
74-
7562
ADD . /app
7663
WORKDIR /app
77-
RUN maturin build --release --features=python && \
64+
RUN maturin build --release --no-default-features --features=python && \
7865
python -m pip install $(ls -1 target/wheels/*.whl | tail -n 1) && \
7966
rm -rf ${CARGO_HOME}/registry

0 commit comments

Comments
 (0)