Build macOS ARM (macOS11) #3
Workflow file for this run
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
name: Build macOS ARM (macOS11) | |
on: | |
# Allows to run the workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build segmentation lib on macOS ARM (macOS 11) | |
runs-on: self-hosted | |
env: | |
SYSTEM_VERSION_COMPAT: 0 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
arch -arm64 brew reinstall zlib | |
- name: Setup pyenv | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
MACOSX_DEPLOYMENT_TARGET: 11.0 | |
PYTHON_CONFIGURE_OPTS: "--enable-framework" | |
CFLAGS: "-Wno-implicit-function-declaration" | |
LDFLAGS: "-L/usr/local/opt/zlib/lib" | |
CPPFLAGS: "-I/usr/local/opt/zlib/include" | |
PKG_CONFIG_PATH: "/usr/local/opt/zlib/lib/pkgconfig" | |
uses: "gabrielfalcao/pyenv-action@v18" | |
with: | |
default: 3.8 | |
command: pip3 install -U pip3 wheel setuptools | |
- name: Built wheel for MacOS ARM | |
run: python3 setup.py bdist_wheel --plat-name macosx_11_0_arm64 | |
- name: Upload Python wheel | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Python wheel | |
path: ${{github.workspace}}/dist/raidionicsseg-*.whl | |
if-no-files-found: error | |
test: | |
needs: build | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
runs-on: self-hosted | |
steps: | |
- name: Setup pyenv for Python ${{ matrix.python-version }} | |
uses: "gabrielfalcao/pyenv-action@v18" | |
with: | |
default: ${{ matrix.python-version }} | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: "Python wheel" | |
- name: Install wheel | |
run: pip3 install --find-links=${{github.workspace}} --force-reinstall raidionicsseg-* | |
shell: bash | |
- name: Test CLI | |
run: python3 -m raidionicsseg --help | |
- name: Clone repo | |
uses: actions/checkout@v4 | |
- name: Inference unit test with TensorFlow model | |
run: cd ${{github.workspace}}/tests && python3 inference_test.py | |
- name: Inference unit test with PyTorch model | |
run: cd ${{github.workspace}}/tests && python3 inference_test_torch_model.py | |
- name: Inference unit test with test-time augmentation | |
run: cd ${{github.workspace}}/tests && python3 inference_test_time_augmentation.py | |
# - name: Test with pytest | |
# run: | | |
# pip install pytest | |
# pytest --verbose tests/ |