Skip to content

Commit

Permalink
mac os tests fix (#1933)
Browse files Browse the repository at this point in the history
  • Loading branch information
even1024 authored Apr 29, 2024
1 parent f2d7689 commit 6c661b8
Showing 1 changed file with 56 additions and 49 deletions.
105 changes: 56 additions & 49 deletions .github/workflows/indigo-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Indigo CI

env:
OS_NAME_MAPPING_JSON: '{"ubuntu": "linux", "windows": "windows", "macos": "macos"}'
OS_NAME_MAPPING_JSON: '{"ubuntu-latest": "linux", "windows-latest": "windows", "macos-13": "macos"}'

on:
push:
Expand Down Expand Up @@ -36,8 +36,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos, ubuntu, windows ]
runs-on: ${{ matrix.os }}-latest
os: [ macos-13, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
needs: static_analysis
steps:
- name: Checkout
Expand All @@ -50,7 +50,7 @@ jobs:
git config --global --add safe.directory '*'
git fetch --tags -f
- name: Build Linux
if: ${{ matrix.os == 'ubuntu' }}
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: docker://epmlsop/buildpack-centos7:latest
with:
args: >
Expand All @@ -62,15 +62,15 @@ jobs:
ctest --verbose
"
- name: Build macOS
if: ${{ matrix.os == 'macos' }}
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
mkdir build
cd build
cmake .. -DBUILD_INDIGO=ON -DBUILD_INDIGO_WRAPPERS=OFF -DBUILD_INDIGO_UTILS=OFF -DBUILD_BINGO=OFF -DBUILD_BINGO_ELASTIC=OFF
cmake --build . --config Release --target all -- -j $(sysctl -n hw.logicalcpu)
ctest --verbose
- name: Build Windows
if: ${{ matrix.os == 'windows' }}
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
mkdir build
cd build
Expand All @@ -87,8 +87,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ windows ]
runs-on: ${{ matrix.os }}-latest
os: [ windows-latest ]
runs-on: ${{ matrix.os }}
needs: static_analysis
steps:
- name: Checkout
Expand All @@ -101,7 +101,7 @@ jobs:
git config --global --add safe.directory '*'
git fetch --tags -f
- name: Build Windows
if: ${{ matrix.os == 'windows' }}
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
mkdir build
cd build
Expand All @@ -118,8 +118,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos, ubuntu ]
runs-on: ${{ matrix.os }}-latest
os: [ macos-13, ubuntu-latest ]
runs-on: ${{ matrix.os }}
needs: static_analysis
steps:
- name: Checkout
Expand All @@ -132,7 +132,7 @@ jobs:
git config --global --add safe.directory '*'
git fetch --tags -f
- name: Build Linux
if: ${{ matrix.os == 'ubuntu' }}
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: docker://epmlsop/buildpack-arm64:latest
with:
args: >
Expand All @@ -144,7 +144,7 @@ jobs:
ctest --verbose -R dlopen
"
- name: Build macOS
if: ${{ matrix.os == 'macos' }}
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
mkdir build
cd build
Expand Down Expand Up @@ -246,8 +246,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos, ubuntu, windows ]
runs-on: ${{ matrix.os }}-latest
os: [ macos-13, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
needs: build_indigo_wrappers
steps:
- name: Checkout
Expand All @@ -269,13 +269,13 @@ jobs:
- name: Install Pillow
run: python3 -m pip install Pillow==9.5.0
- name: Install wrappers Linux
if: ${{ matrix.os == 'ubuntu' }}
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: python3 -m pip install dist/*manylinux1_x86_64*.whl
- name: Install wrappers Windows
if: ${{ matrix.os == 'windows' }}
if: ${{ startsWith(matrix.os, 'windows') }}
run: Get-ChildItem dist -Filter *win_amd64*.whl -Recurse | % { python3 -m pip install $_.FullName }
- name: Install wrappers macOS
if: ${{ matrix.os == 'macos' }}
if: ${{ startsWith(matrix.os, 'macos') }}
run: python3 -m pip install dist/*macosx_10_7_intel*.whl
- name: Test
run: python3 -Wignore api/tests/integration/test.py -t 1 -j junit_report.xml
Expand All @@ -292,8 +292,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu ]
runs-on: ${{ matrix.os }}-latest
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
needs: build_indigo_wrappers
steps:
- name: Checkout
Expand All @@ -313,7 +313,7 @@ jobs:
name: indigo-python
path: dist/
- name: Test Linux
if: ${{ matrix.os == 'ubuntu' }}
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: uraimo/[email protected]
with:
arch: aarch64
Expand All @@ -338,8 +338,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ windows ]
runs-on: ${{ matrix.os }}-latest
os: [ windows-latest ]
runs-on: ${{ matrix.os }}
needs: build_indigo_wrappers
steps:
- name: Checkout
Expand All @@ -366,7 +366,7 @@ jobs:
- name: Install Pillow
run: python -m pip install Pillow==9.5.0
- name: Install wrappers Windows
if: ${{ matrix.os == 'windows' }}
if: ${{ startsWith(matrix.os, 'windows') }}
run: Get-ChildItem dist -Filter *win32*.whl -Recurse | % { python -m pip install $_.FullName }
- name: Test
run: python api/tests/integration/test.py -t 1 -p basic/basic.py -j junit_report.xml
Expand All @@ -383,8 +383,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos, ubuntu, windows ]
runs-on: ${{ matrix.os }}-latest
os: [ macos-13, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
needs: build_indigo_wrappers
steps:
- name: Checkout
Expand Down Expand Up @@ -424,8 +424,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu ]
runs-on: ${{ matrix.os }}-latest
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
needs: build_indigo_wrappers
steps:
- name: Checkout
Expand All @@ -445,7 +445,7 @@ jobs:
name: indigo-java
path: dist/
- name: Test Linux
if: ${{ matrix.os == 'ubuntu' }}
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: uraimo/[email protected]
with:
arch: aarch64
Expand All @@ -470,8 +470,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ windows ]
runs-on: ${{ matrix.os }}-latest
os: [ windows-latest ]
runs-on: ${{ matrix.os }}
needs: build_indigo_wrappers
steps:
- name: Checkout
Expand Down Expand Up @@ -516,8 +516,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos, ubuntu, windows ]
runs-on: ${{ matrix.os }}-latest
os: [ macos-13, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
needs: build_indigo_wrappers
steps:
- name: Checkout
Expand All @@ -542,37 +542,44 @@ jobs:
mkdir tmp
cd IronPython
curl -OL https://github.com/IronLanguages/ironpython3/releases/download/v3.4.0/IronPython.3.4.0.zip
- name: Install dotnet 6
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
curl -Lo dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/270b615f-5281-4c58-980f-d9f7a08db642/3e874492a9cb0d5b87195c596b46d609/dotnet-sdk-6.0.421-osx-x64.tar.gz
mkdir -p ${{ github.workspace }}/tmp/dotnet && tar zxf dotnet.tar.gz -C ${{ github.workspace }}/tmp/dotnet
- name: Prepare UNIX
if: ${{ matrix.os != 'windows' }}
if: ${{ !startsWith(matrix.os, 'windows') }}
run: |
cd IronPython
unzip IronPython.3.4.0.zip
cd ../tmp
unzip ../dist/Indigo.Net.*.nupkg
chmod -R a+rw .
- name: Prepare Windows
if: ${{ matrix.os == 'windows' }}
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
cd IronPython
Expand-Archive IronPython.3.4.0.zip .
cd ../tmp
Expand-Archive ../dist/Indigo.Net.*.nupkg .
- name: Test Linux
if: ${{ matrix.os == 'ubuntu' }}
if: ${{ startsWith(matrix.os, 'ubuntu') }}
env:
INDIGO_PATH: ${{ github.workspace }}/tmp/lib/netstandard2.0/Indigo.Net.dll
LD_LIBRARY_PATH: ${{ github.workspace }}/tmp/runtimes/linux-x64/native
run: |
dotnet IronPython/net6.0/ipy.dll api/tests/integration/test.py -t 1 -j junit_report.xml
- name: Test macOS
if: ${{ matrix.os == 'macos' }}
if: ${{ startsWith(matrix.os, 'macos') }}
env:
INDIGO_PATH: ${{ github.workspace }}/tmp/lib/netstandard2.0/Indigo.Net.dll
DOTNET_ROOT: ${{ github.workspace }}/tmp/dotnet
PATH: ${{ github.workspace }}/tmp/dotnet:$PATH
run: |
export DYLD_LIBRARY_PATH=${PWD}/tmp/runtimes/osx-x64/native
dotnet IronPython/net6.0/ipy.dll api/tests/integration/test.py -t 1 -j junit_report.xml
- name: Test Windows
if: ${{ matrix.os == 'windows' }}
if: ${{ startsWith(matrix.os, 'windows') }}
env:
INDIGO_PATH: ${{ github.workspace }}/tmp/lib/netstandard2.0/Indigo.Net.dll
PATH: ${{ env.PATH }};${{ github.workspace }}/tmp/runtimes/win-x64/native
Expand All @@ -590,8 +597,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ windows ]
runs-on: ${{ matrix.os }}-latest
os: [ windows-latest ]
runs-on: ${{ matrix.os }}
needs: build_indigo_wrappers
steps:
- name: Checkout
Expand All @@ -617,7 +624,7 @@ jobs:
cd IronPython
curl -OL https://github.com/IronLanguages/ironpython3/releases/download/v3.4.0/IronPython.3.4.0.zip
- name: Prepare Windows
if: ${{ matrix.os == 'windows' }}
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
cd IronPython
Expand-Archive IronPython.3.4.0.zip .
Expand Down Expand Up @@ -843,8 +850,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos, ubuntu, windows ]
runs-on: ${{ matrix.os }}-latest
os: [ macos-13, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
needs: static_analysis
steps:
- name: Checkout
Expand All @@ -857,7 +864,7 @@ jobs:
git config --global --add safe.directory '*'
git fetch --tags -f
- name: Build utils Linux
if: ${{ matrix.os == 'ubuntu' }}
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: docker://epmlsop/buildpack-centos7:latest
with:
args: >
Expand All @@ -869,15 +876,15 @@ jobs:
ctest --verbose
"
- name: Build utils macOS
if: ${{ matrix.os == 'macos' }}
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
mkdir build
cd build
cmake .. -DBUILD_INDIGO=OFF -DBUILD_INDIGO_WRAPPERS=OFF -DBUILD_BINGO=OFF -DBUILD_BINGO_ELASTIC=OFF -DBUILD_INDIGO_UTILS=ON
cmake --build . --config Release --target all -- -j $(sysctl -n hw.logicalcpu)
ctest --verbose
- name: Build utils Windows
if: ${{ matrix.os == 'windows' }}
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
mkdir build
cd build
Expand Down Expand Up @@ -1088,7 +1095,7 @@ jobs:
fail-fast: false
matrix:
postgres_major_version: [ 12, 13, 14, 15 ]
runs-on: macos-latest
runs-on: macos-13
needs: static_analysis
steps:
- name: Checkout
Expand Down Expand Up @@ -1122,8 +1129,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ windows ]
runs-on: ${{ matrix.os }}-latest
os: [ windows-latest ]
runs-on: ${{ matrix.os }}
needs: static_analysis
steps:
- name: Checkout
Expand Down

0 comments on commit 6c661b8

Please sign in to comment.