Skip to content

Commit 61ad022

Browse files
committed
Merge branch 'main' into master
2 parents 83a49f1 + ee30368 commit 61ad022

File tree

109 files changed

+1086
-1107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+1086
-1107
lines changed

.circleci/config.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
version: 2.1
2+
3+
parameters:
4+
REF:
5+
type: string
6+
default: ''
7+
description: Optional tag to build
8+
9+
jobs:
10+
arm-wheels:
11+
parameters:
12+
build:
13+
type: string
14+
image:
15+
type: string
16+
17+
machine:
18+
image: ubuntu-2404:current
19+
resource_class: arm.medium # 2 vCPUs
20+
21+
environment:
22+
CIBW_ARCHS: "aarch64"
23+
CIBW_MANYLINUX_AARCH64_IMAGE: "<< parameters.image >>"
24+
CIBW_MUSLLINUX_AARCH64_IMAGE: "<< parameters.image >>"
25+
CIBW_BUILD: "<< parameters.build >>"
26+
27+
steps:
28+
- checkout
29+
- when:
30+
condition: << pipeline.parameters.REF >>
31+
steps:
32+
- run:
33+
name: Checkout branch/tag << pipeline.parameters.REF >>
34+
command: |
35+
echo "Switching to branch/tag << pipeline.parameters.REF >> if it exists"
36+
git checkout << pipeline.parameters.REF >> || true
37+
git pull origin << pipeline.parameters.REF >> || true
38+
- run:
39+
name: install cibuildwheel and other build reqs
40+
command: |
41+
python3 -m pip install --upgrade pip setuptools setuptools_scm[toml]
42+
python3 -m pip install -rcibw-requirements.txt
43+
44+
- run:
45+
name: pip freeze
46+
command: |
47+
python3 -m pip freeze
48+
49+
- run:
50+
name: list wheels
51+
command: |
52+
python3 -m cibuildwheel . --print-build-identifiers
53+
54+
- run:
55+
name: cibuildwheel
56+
command: |
57+
python3 -m cibuildwheel .
58+
59+
- store_test_results:
60+
path: test-results/
61+
62+
- store_artifacts:
63+
path: wheelhouse/
64+
65+
# - when:
66+
# condition:
67+
# or:
68+
# - matches:
69+
# pattern: ".+"
70+
# value: "<< pipeline.git.tag >>"
71+
# - << pipeline.parameters.REF >>
72+
# steps:
73+
# - run:
74+
# environment:
75+
# TWINE_NONINTERACTIVE: "1"
76+
# command: |
77+
# python3 -m pip install twine
78+
# python3 -m twine upload --verbose --skip-existing wheelhouse/*
79+
80+
workflows:
81+
wheels: # This is the name of the workflow, feel free to change it to better match your workflow.
82+
# Inside the workflow, you define the jobs you want to run.
83+
jobs:
84+
- arm-wheels:
85+
name: arm-wheels-manylinux_2_28
86+
filters:
87+
branches:
88+
only: main
89+
tags:
90+
only: /.*/
91+
build: "*manylinux*"
92+
image: quay.io/pypa/manylinux_2_28_aarch64
93+
- arm-wheels:
94+
name: arm-wheels-musllinux_1_2
95+
filters:
96+
branches:
97+
only: main
98+
tags:
99+
only: /.*/
100+
build: "*musllinux*"
101+
image: quay.io/pypa/musllinux_1_2_aarch64

.github/workflows/ci-tests.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
strategy:
3333
matrix:
3434
py-ver-major: [3]
35-
py-ver-minor: [8, 9, 10, 11, 12]
35+
py-ver-minor: [9, 10, 11, 12, 13]
3636
step: [lint, unit, bandit, mypy]
3737

3838
env:
@@ -44,11 +44,11 @@ jobs:
4444
with:
4545
fetch-depth: 0
4646

47-
- name: Set up Singularity
47+
- name: Set up Singularity and environment-modules
4848
if: ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
4949
run: |
5050
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-focal_amd64.deb
51-
sudo apt-get install -y ./singularity-ce_3.10.4-focal_amd64.deb
51+
sudo apt-get install -y ./singularity-ce_3.10.4-focal_amd64.deb environment-modules
5252
5353
- name: Give the test runner user a name to make provenance happy.
5454
if: ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
@@ -132,10 +132,10 @@ jobs:
132132
with:
133133
fetch-depth: 0
134134

135-
- name: Set up Singularity
135+
- name: Set up Singularity and environment-modules
136136
run: |
137137
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-focal_amd64.deb
138-
sudo apt-get install -y ./singularity-ce_3.10.4-focal_amd64.deb
138+
sudo apt-get install -y ./singularity-ce_3.10.4-focal_amd64.deb environment-modules
139139
140140
- name: Give the test runner user a name to make provenance happy.
141141
run: sudo usermod -c 'CI Runner' "$(whoami)"
@@ -165,6 +165,7 @@ jobs:
165165
runs-on: ubuntu-22.04
166166

167167
strategy:
168+
fail-fast: false
168169
matrix:
169170
cwl-version: [v1.0, v1.1, v1.2]
170171
container: [docker, singularity, podman]
@@ -179,11 +180,11 @@ jobs:
179180
steps:
180181
- uses: actions/checkout@v4
181182

182-
- name: Set up Singularity
183+
- name: Set up Singularity and environment-modules
183184
if: ${{ matrix.container == 'singularity' }}
184185
run: |
185186
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-jammy_amd64.deb
186-
sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb
187+
sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb environment-modules
187188
188189
- name: Singularity cache
189190
if: ${{ matrix.container == 'singularity' }}
@@ -228,10 +229,10 @@ jobs:
228229
steps:
229230
- uses: actions/checkout@v4
230231

231-
- name: Set up Singularity
232+
- name: Set up Singularity and environment-modules
232233
run: |
233234
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-jammy_amd64.deb
234-
sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb
235+
sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb environment-modules
235236
236237
- name: Set up Python
237238
uses: actions/setup-python@v5

.github/workflows/wheels.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: Python package build and publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch: {}
7+
repository_dispatch: {}
8+
push:
9+
branches:
10+
- main
11+
12+
concurrency:
13+
group: wheels-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build_wheels:
18+
name: ${{ matrix.image }} wheels
19+
runs-on: ubuntu-24.04
20+
strategy:
21+
matrix:
22+
include:
23+
- image: manylinux_2_28_x86_64
24+
build: "*manylinux*"
25+
- image: musllinux_1_2_x86_64
26+
build: "*musllinux*"
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
if: ${{ github.event_name != 'repository_dispatch' }}
31+
with:
32+
fetch-depth: 0 # slow, but gets all the tags
33+
- uses: actions/checkout@v4
34+
if: ${{ github.event_name == 'repository_dispatch' }}
35+
with:
36+
fetch-depth: 0 # slow, but gets all the tags
37+
ref: ${{ github.event.client_payload.ref }}
38+
39+
# - name: Set up QEMU
40+
# if: runner.os == 'Linux'
41+
# uses: docker/setup-qemu-action@v2
42+
# with:
43+
# platforms: all
44+
45+
- name: Build wheels
46+
uses: pypa/[email protected]
47+
env:
48+
CIBW_BUILD: ${{ matrix.build }}
49+
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/${{ matrix.image }}
50+
CIBW_MUSLLINUX_X86_64_IMAGE: quay.io/pypa/${{ matrix.image }}
51+
# configure cibuildwheel to build native 64-bit archs ('auto64'), and some
52+
# emulated ones
53+
# Linux arm64 wheels are built on circleci
54+
CIBW_ARCHS_LINUX: auto64 # ppc64le s390x
55+
56+
- uses: actions/upload-artifact@v4
57+
with:
58+
name: artifact-${{ matrix.image }}
59+
path: ./wheelhouse/*.whl
60+
61+
build_sdist:
62+
name: Build source distribution
63+
runs-on: ubuntu-24.04
64+
steps:
65+
- uses: actions/checkout@v4
66+
if: ${{ github.event_name != 'repository_dispatch' }}
67+
with:
68+
fetch-depth: 0 # slow, but gets all the tags
69+
- uses: actions/checkout@v4
70+
if: ${{ github.event_name == 'repository_dispatch' }}
71+
with:
72+
fetch-depth: 0 # slow, but gets all the tags
73+
ref: ${{ github.event.client_payload.ref }}
74+
75+
- name: Build sdist
76+
run: pipx run build --sdist
77+
78+
- uses: actions/upload-artifact@v4
79+
with:
80+
name: artifact-source
81+
path: dist/*.tar.gz
82+
83+
build_wheels_macos:
84+
name: Build wheels on ${{ matrix.os }}
85+
runs-on: ${{ matrix.os }}
86+
strategy:
87+
matrix:
88+
# macos-13 is an intel runner, macos-14 is apple silicon
89+
os: [macos-13, macos-14]
90+
steps:
91+
- uses: actions/checkout@v4
92+
if: ${{ github.event_name != 'repository_dispatch' }}
93+
with:
94+
fetch-depth: 0 # slow, but gets all the tags
95+
- uses: actions/checkout@v4
96+
if: ${{ github.event_name == 'repository_dispatch' }}
97+
with:
98+
fetch-depth: 0 # slow, but gets all the tags
99+
ref: ${{ github.event.client_payload.ref }}
100+
101+
- name: Build wheels
102+
uses: pypa/[email protected]
103+
104+
- uses: actions/upload-artifact@v4
105+
with:
106+
name: artifact-${{ matrix.os }}-${{ strategy.job-index }}
107+
path: ./wheelhouse/*.whl
108+
109+
# upload_pypi:
110+
# needs: [build_wheels, build_sdist]
111+
# runs-on: ubuntu-24.04
112+
# environment: deploy
113+
# permissions:
114+
# id-token: write
115+
# if: (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'repository_dispatch' && github.event.client_payload.publish_wheel == true)
116+
# steps:
117+
# - uses: actions/download-artifact@v4
118+
# with:
119+
# # unpacks default artifact into dist/
120+
# pattern: artifact-*
121+
# merge-multiple: true
122+
# path: dist
123+
124+
# - name: Publish package distributions to PyPI
125+
# uses: pypa/gh-action-pypi-publish@release/v1
126+
# with:
127+
# skip-existing: true

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Generated during tests
22
pytestdebug.log
33
tmp/
4+
*.sif
5+
involucro
46

57
# Python temps
68
__pycache__/
@@ -59,4 +61,3 @@ cwltool/_version.py
5961
cwltool_deps
6062
docs/_build/
6163
docs/autoapi/
62-

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ include tests/reloc/dir2/*
1919
include tests/checker_wf/*
2020
include tests/subgraph/*
2121
include tests/input_deps/*
22+
recursive-include tests/test_deps_env
2223
include tests/trs/*
2324
include tests/wf/generator/*
2425
include cwltool/py.typed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ MODULE=cwltool
2424

2525
# `SHELL=bash` doesn't work for some, so don't use BASH-isms like
2626
# `[[` conditional expressions.
27-
PYSOURCES=$(wildcard ${MODULE}/**.py cwltool/cwlprov/*.py tests/*.py) setup.py
27+
PYSOURCES=$(wildcard ${MODULE}/**.py cwltool/cwlprov/*.py tests/*.py tests/cwl-conformance/*.py) setup.py
2828
DEVPKGS=diff_cover pylint pep257 pydocstyle 'tox<4' tox-pyenv auto-walrus \
2929
isort wheel autoflake pyupgrade bandit -rlint-requirements.txt\
3030
-rtest-requirements.txt -rmypy-requirements.txt -rdocs/requirements.txt
@@ -190,7 +190,7 @@ shellcheck: FORCE
190190
cwltool-in-docker.sh
191191

192192
pyupgrade: $(PYSOURCES)
193-
pyupgrade --exit-zero-even-if-changed --py38-plus $^
193+
pyupgrade --exit-zero-even-if-changed --py39-plus $^
194194
auto-walrus $^
195195

196196
release-test: FORCE

README.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,22 @@ and ``--tmp-outdir-prefix`` to somewhere under ``/Users``::
189189

190190
$ cwl-runner --tmp-outdir-prefix=/Users/username/project --tmpdir-prefix=/Users/username/project wc-tool.cwl wc-job.json
191191

192+
193+
Docker default platform on macOS with Apple Silicon
194+
===================================================
195+
196+
If macOS users want to run CWL tools/workflows using ``cwltool`` with Docker and their software containers only have support for amd64 (64-bit x86) CPUs, but they have an Apple Silicon (aarch64/arm64) CPU,
197+
they run into the error:
198+
199+
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested.
200+
201+
To fix this, export the following environment variable before executing `cwltool`:
202+
203+
``export DOCKER_DEFAULT_PLATFORM=linux/amd64``
204+
205+
To automatically have this variable set in the future, add the same command to ones respective shell profile (e.g. ``~/.zshrc``, ``~/.bash_profile``).
206+
207+
192208
Using uDocker
193209
=============
194210

cibw-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cibuildwheel==2.21.3

0 commit comments

Comments
 (0)