diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index abff1d712..587a37bff 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -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: @@ -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 @@ -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 \ No newline at end of file + pymarian-eval --version + pymarian --version \ No newline at end of file diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 0df834766..0de2024f3 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -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 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 55ff0d688..3be7c6361 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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 }} @@ -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 @@ -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 @@ -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