Skip to content

Commit

Permalink
github workflows: pymarian matrix for Mac,
Browse files Browse the repository at this point in the history
disabled for Windows
  • Loading branch information
Thamme Gowda committed Aug 12, 2024
1 parent 0a625a9 commit 315e8ae
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 12 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ on:

jobs:
build-macos:
name: MacOS CPU-only
strategy:
matrix:
include:
- name: "Pymarian=YES"
pymarian: true
- name: "Pymarian=NO"
pymarian: false
name: "MacOS CPU-only ${{ matrix.name }}"
runs-on: macos-12

steps:
Expand All @@ -33,7 +40,8 @@ jobs:
-DCOMPILE_SERVER=off \
-DCOMPILE_TESTS=on \
-DUSE_FBGEMM=on \
-DUSE_SENTENCEPIECE=on
-DUSE_SENTENCEPIECE=on \
-DPYMARIAN=${{matrix.pymarian}}
- name: Compile
working-directory: build
Expand All @@ -52,8 +60,12 @@ jobs:
ls -hlv $(find . -maxdepth 1 -type f -perm +ugo+x \( -name "marian*" -o -name "spm*" \))
- name: Install PyMarian
working-directory: build
if: matrix.pymarian == true
run: |
echo "Wheels built: " && ls -lh pymarian*.whl
python3 -m pip install --upgrade pip setuptools wheel pytest
CMAKE_ARGS="" python3 -m pip install -v .
python3 -m pip install -v pymarian*.whl
python3 -m pymarian -v
MARIAN_QUIET=YES python3 -m pytest -vs src/python/tests
pymarian-eval --version
pymarian --version
5 changes: 2 additions & 3 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,10 @@ jobs:
env:
CUDA_VERSION: ${{ matrix.cuda }}
run: |
ls -lh pymarian*.whl
echo "Built wheels:" && ls -lh pymarian*.whl
pytag=$(python3 -c 'import sys; x,y=sys.version_info[:2]; print(f"cp{x}{y}-{sys.platform}")')
whl=$(echo pymarian*${pytag}*.whl)
echo "Chosen wheel: $pytag :: $whl"
ls -lh $whl
echo "Chosen wheel: $pytag :: $whl" && ls -lh $whl
python3 -m pip install --upgrade pip pytest
python3 -m pip install -v $whl
python3 -m pymarian -v
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ jobs:
- name: "Windows CPU-only"
cuda: ""
gpu: false
pymarian: false
# Windows CPU+GPU build
- name: "Windows CPU+CUDA"
cuda: "10.2"
gpu: true
pymarian: false

runs-on: windows-2019
name: ${{ matrix.name }}
Expand Down Expand Up @@ -86,6 +88,7 @@ jobs:
-DUSE_MPI="FALSE"
-DUSE_NCCL="FALSE"
-DUSE_SENTENCEPIECE="TRUE"
-DPYMARIAN="${{ matrix.pymarian }}"
-DUSE_STATIC_LIBS="TRUE"'
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: ${{ github.workspace }}/CMakeLists.txt
Expand Down Expand Up @@ -116,6 +119,7 @@ jobs:
-DUSE_MPI="FALSE"
-DUSE_NCCL="FALSE"
-DUSE_SENTENCEPIECE="TRUE"
-DPYMARIAN="${{ matrix.pymarian }}"
-DUSE_STATIC_LIBS="TRUE"'
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: ${{ github.workspace }}/CMakeLists.txt
Expand All @@ -138,12 +142,20 @@ jobs:
shell: cmd

- name: Install PyMarian
working-directory: src/python
if: matrix.pymarian == true
working-directory: build/
run: |
python3 -m pip install --upgrade pip setuptools wheel pytest
python3 -m pip install -v .
echo "Built wheels:"
ls pymarian*.whl
$pytag = python3 -c 'import sys; x,y=sys.version_info[:2]; print(f"cp{x}{y}-{sys.platform}")'
$whl = ls pymarian*$pytag*.whl
echo "Chosen wheel: $pytag :: $whl"
ls $whl
python3 -m pip install --upgrade pip pytest
python3 -m pip install -v $whl
python3 -m pymarian -v
python3 -m pytest -vs src/python/tests
pymarian-eval --version
pymarian --version
env:
CUDA_VERSION: ${{ matrix.cuda }}
shell: cmd
shell: powershell

0 comments on commit 315e8ae

Please sign in to comment.