Skip to content

Commit

Permalink
CI bugfixes
Browse files Browse the repository at this point in the history
Update cibuildwheel version.
Workaround test segfault.
Fix syntax error in utils.py
Update actions to node-20
Change to setup-micromamba
  • Loading branch information
mducle committed Apr 24, 2024
1 parent 56816f1 commit 17e36fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,20 @@ jobs:
os: [ubuntu-22.04, windows-2022, macos-12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache MCR
if: ${{ matrix.os != 'ubuntu-22.04' }}
id: cache-mcr
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: mcr
key: ${{ runner.os }}-matlab-${{ env.MCRVER }}-mcr
lookup-only: true
- name: Cache gists
id: cache-gists
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: gists
key: ${{ runner.os }}-gists
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
os: [ubuntu-22.04, windows-2022, macos-12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup variables
Expand Down Expand Up @@ -143,28 +143,27 @@ jobs:
uses: matlab-actions/[email protected]
with:
release: ${{ env.MLVER }}
- uses: actions/cache/restore@v3
- uses: actions/cache/restore@v4
if: ${{ matrix.os != 'ubuntu-22.04' }}
with:
path: mcr
key: ${{ runner.os }}-matlab-${{ env.MCRVER }}-mcr
fail-on-cache-miss: true
- uses: actions/cache/restore@v3
- uses: actions/cache/restore@v4
with:
path: gists
key: ${{ runner.os }}-gists
fail-on-cache-miss: true
- uses: pypa/cibuildwheel@v2.12.0
- uses: pypa/cibuildwheel@v2.17.0
env:
CIBW_BUILD: ${{ env.CIBW }}
CIBW_ENVIRONMENT: >-
MATLABEXECUTABLE="${{ env.MLPREFIX }}${{ env.MATLABEXECUTABLE }}"
HOSTDIRECTORY="${{ env.MLPREFIX }}${{ env.HOSTDIRECTORY }}"
CIBW_BUILD_VERBOSITY: 1
MACOSX_DEPLOYMENT_TARGET: "10.15"
- uses: mamba-org/provision-with-micromamba@main
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: false
cache-downloads: true
- name: Install wheels and run test
run: |
Expand All @@ -176,7 +175,9 @@ jobs:
eval "$($MAMBA_EXE shell activate py$pyver)"
python -m pip install wheelhouse/*cp$(echo $pyver | sed s/\\.//)*
cd test
python run_test.py
# Sometimes the test results in a segfault on exit
python run_test.py || true
test -f success
cd ..
done
- name: Upload release wheels
Expand All @@ -187,7 +188,7 @@ jobs:
#- name: Setup tmate
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_artifacts.zip
path: |
Expand Down
2 changes: 1 addition & 1 deletion libpymcr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def guess_from_env(self, ld_path=None):
def guess_from_syspath(self):
matlab_exe = shutil.which('matlab')
if matlab_exe is None:
return None if self.system == 'Windows' else guess_from_env('PATH')
return None if self.system == 'Windows' else self.guess_from_env('PATH')
mlbinpath = os.path.dirname(os.path.realpath(matlab_exe))
return self.find_version(os.path.abspath(os.path.join(mlbinpath, '..')))

Expand Down

0 comments on commit 17e36fa

Please sign in to comment.