-
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.
* MPICH: Configure --with-device=ch4:ucx,ofi * Open MPI: Configure --with-ucx --with-ofi * Remove support for ppc64le architecture * Use manylinux 2.28 image * Reproducible builds * Strip binaries to reduce size * Remove unneeded binaries * Package various licenses
- Loading branch information
Showing
21 changed files
with
973 additions
and
160 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 |
---|---|---|
|
@@ -54,7 +54,6 @@ on: # yamllint disable-line rule:truthy | |
- all | ||
- Linux | ||
- Linux-aarch64 | ||
- Linux-ppc64le | ||
- Linux-x86_64 | ||
- macOS | ||
- macOS-arm64 | ||
|
@@ -76,11 +75,11 @@ jobs: | |
shell: python | ||
name: 'setup build matrix' | ||
run: | | ||
# setup build matrix # " | ||
keys = ("os", "arch", "runner") | ||
rows = [ | ||
("Linux", "aarch64", "ubuntu-22.04"), | ||
("Linux", "ppc64le", "ubuntu-22.04"), | ||
("Linux", "x86_64", "ubuntu-22.04"), | ||
("Linux", "aarch64", "ubuntu-24.04-arm"), | ||
("Linux", "x86_64", "ubuntu-24.04"), | ||
("macOS", "arm64", "macos-14"), | ||
("macOS", "x86_64", "macos-13"), | ||
] | ||
|
@@ -93,6 +92,7 @@ jobs: | |
import os, json | ||
with open(os.getenv("GITHUB_OUTPUT"), "w") as out: | ||
print(f"matrix={json.dumps(matrix)}", file=out) | ||
# " | ||
build: | ||
needs: setup | ||
|
@@ -113,16 +113,21 @@ jobs: | |
if: ${{ runner.os == 'macOS' }} | ||
name: setup-macOS | ||
run: | | ||
# set macOS deployment target | ||
case $(uname -m) in | ||
arm64) echo MACOSX_DEPLOYMENT_TARGET=11.0 >> $GITHUB_ENV ;; | ||
x86_64) echo MACOSX_DEPLOYMENT_TARGET=10.15 >> $GITHUB_ENV ;; | ||
esac | ||
# create gfortran symlink | ||
cd $(brew --prefix)/bin | ||
gfortran=$(ls gfortran-* | sort | head -n 1) | ||
sudo ln -s $gfortran gfortran | ||
# unlink libevent | ||
brew unlink libevent || true | ||
# install autotools | ||
brew install autoconf | ||
brew install automake | ||
brew install libtool | ||
# unlink libevent | ||
brew unlink libevent || true | ||
# install uv | ||
brew install uv | ||
|
@@ -131,20 +136,19 @@ jobs: | |
with: | ||
python-version: 3 | ||
|
||
- id: setup-qemu | ||
if: ${{ runner.os == 'Linux' }} | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
|
||
- id: bootstrap | ||
run: ./bootstrap.sh | ||
|
||
- id: source-date-epoch | ||
run: | | ||
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) | ||
read -r SOURCE_DATE_EPOCH < source-date-epoch || true | ||
SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH:-$(git log -1 --pretty=%ct)} | ||
echo SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH >> $GITHUB_ENV | ||
echo $(git log -1 --pretty=%ci) [timestamp=$SOURCE_DATE_EPOCH] | ||
test $(uname) = Darwin && (echo ZERO_AR_DATE=1 >> $GITHUB_ENV) | ||
echo [SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH] $( | ||
date -u -d @$SOURCE_DATE_EPOCH 2>/dev/null || | ||
date -u -r $SOURCE_DATE_EPOCH 2>/dev/null ) | ||
working-directory: package/source | ||
|
||
- id: build | ||
uses: pypa/[email protected] | ||
|
@@ -159,6 +163,8 @@ jobs: | |
CIBW_ARCHS: "${{ matrix.arch }}" | ||
CIBW_BEFORE_ALL: >- | ||
bash {project}/cibw-build-mpi.sh | ||
CIBW_BEFORE_BUILD: >- | ||
bash {project}/cibw-patch-cmd.sh | ||
CIBW_TEST_COMMAND: >- | ||
bash {project}/cibw-check-mpi.sh | ||
CIBW_ENVIRONMENT_PASS: >- | ||
|
@@ -171,12 +177,8 @@ jobs: | |
SOURCE="$PWD/package/source" | ||
WORKDIR="$PWD/package/workdir" | ||
DESTDIR="$PWD/package/install" | ||
CIBW_REPAIR_WHEEL_COMMAND_MACOS: > | ||
delocate-wheel | ||
--ignore-missing-dependencies | ||
--exclude libmpi --exclude libpmpi | ||
--require-archs {delocate_archs} | ||
-w {dest_dir} -v {wheel} | ||
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | ||
|
||
- id: sha256sum | ||
run: | | ||
|
@@ -190,8 +192,24 @@ jobs: | |
- id: upload | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheel-${{ inputs.mpiname }}-${{ matrix.os }}-${{ matrix.arch }} | ||
name: "wheel-${{ inputs.mpiname }}-\ | ||
${{ inputs.version || 'latest' }}-\ | ||
${{ matrix.os }}-${{ matrix.arch }}" | ||
path: wheelhouse/*.whl | ||
|
||
- id: check | ||
run: ./check-wheel.sh wheelhouse | ||
run: ./wheel-check.sh wheelhouse | ||
|
||
- id: test | ||
run: | | ||
# ./wheel-test.sh | ||
test $(uname) = Linux && runner=( | ||
docker run | ||
-e MPINAME=${{ inputs.mpiname }} | ||
-v $(pwd):/${{ github.workspace }} | ||
-w ${{ github.workspace }} | ||
--platform linux/${{ | ||
matrix.arch == 'aarch64' && 'arm64' || | ||
matrix.arch == 'x86_64' && 'amd64' | ||
}} python:3) | ||
${runner[@]:-} ./wheel-test.sh wheelhouse |
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
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 |
---|---|---|
|
@@ -5,4 +5,5 @@ | |
/venv/ | ||
*.egg-info/ | ||
*.tar.gz | ||
*.tar.bz2 | ||
*~ |
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,13 @@ | ||
# https://github.com/adrienverge/yamllint | ||
|
||
extends: default | ||
rules: | ||
document-start: disable | ||
colons: | ||
max-spaces-before: 0 | ||
max-spaces-after: -1 | ||
indentation: | ||
indent-sequences: whatever | ||
line-length: | ||
level: warning | ||
max: 80 |
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,19 +1,21 @@ | ||
build: | ||
./bootstrap.sh | ||
./build-wheel.sh dist | ||
./check-wheel.sh dist | ||
./wheel-build.sh dist | ||
./wheel-check.sh dist | ||
./wheel-test.sh dist | ||
|
||
lint: | ||
codespell *.sh */*.py | ||
shellcheck *.sh | ||
ruff check -qn package/*.py | ||
ruff check -qn */*.py | ||
yamllint .github/ | ||
|
||
clean: | ||
$(RM) -r package/METADATA | ||
$(RM) -r package/LICENSE* | ||
$(RM) -r package/build | ||
$(RM) -r package/LICENSE | ||
$(RM) -r package/install | ||
$(RM) -r package/source | ||
$(RM) -r package/workdir | ||
$(RM) -r package/install | ||
$(RM) -r package/*.egg-info | ||
$(RM) -r .*_cache |
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
Oops, something went wrong.