From 3e73325b1094a80a4053042986b521a5ba2423e8 Mon Sep 17 00:00:00 2001 From: spol Date: Sat, 25 Jan 2025 12:02:41 +0100 Subject: [PATCH] ps - bash - ps - cmd --- .github/workflows/customized-win-shells.yml | 11 +---- .github/workflows/python-package-conda.yml | 53 +++++++++++---------- 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/.github/workflows/customized-win-shells.yml b/.github/workflows/customized-win-shells.yml index a39fc94..8bd9aff 100644 --- a/.github/workflows/customized-win-shells.yml +++ b/.github/workflows/customized-win-shells.yml @@ -33,7 +33,7 @@ jobs: .\Launch-VsDevShell.ps1 cd ${{ github.workspace }}/source/MagTenseFortranCuda/cuda make wrap - ls -al + ls - name: Run x64 Native Tools Command Prompt for VS 2022 shell: cmd /k "{0}" -arch=amd64 -host_arch=x64 @@ -41,12 +41,3 @@ jobs: run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" nvcc && make cuda - - # - name: Run Developer PowerShell for VS 2022 - # shell: pwsh -NoExit -ExecutionPolicy ByPass -File {0} - # run: | - # cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\" - # .\Launch-VsDevShell.ps1 - # cd ${{ github.workspace }}/python/src/magtense/lib/ - # ls - # LIB /VERBOSE diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 84cea8b..4edd2c6 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -16,33 +16,38 @@ jobs: python-version: 3.12 auto-activate-base: false - - name: Compile Fortran source code and build Python wrapper - shell: bash -el {0} - working-directory: ${{ github.workspace }}/python/src/magtense/lib/ - run: make + # - name: Compile Fortran source code and build Python wrapper + # shell: bash -el {0} + # working-directory: ${{ github.workspace }}/python/src/magtense/lib/ + # run: make - # - name: Compile Fortran files in Developer PowerShell for VS 2022 - # shell: pwsh -NoExit -ExecutionPolicy ByPass -File {0} - # run: | - # cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\" - # .\Launch-VsDevShell.ps1 - # cd ${{ github.workspace }}/python/src/magtense/lib/ - # make ps + - name: Compile Fortran files in Developer PowerShell for VS 2022 + shell: pwsh -NoExit -ExecutionPolicy ByPass -File {0} + run: | + cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\" + .\Launch-VsDevShell.ps1 + cd ${{ github.workspace }}/python/src/magtense/lib/ + make ps - # - name: Compile with nvcc in Bash - # shell: bash -el {0} - # working-directory: ${{ github.workspace }}/source/MagTenseFortranCuda/cuda - # run: | - # nvcc -c MagTenseCudaBlas.cu -ccbin "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64" -o MagTenseCudaBlas.o - # "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/Tools/VsDevCmd.bat" - # make wrap + - name: Compile with nvcc in Bash + shell: bash -el {0} + working-directory: ${{ github.workspace }}/source/MagTenseFortranCuda/cuda + run: nvcc -c MagTenseCudaBlas.cu -ccbin "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64" -o MagTenseCudaBlas.o - # - name: Build Python wrapper in x64 Native Tools Command Prompt for VS 2022 - # shell: cmd /k "{0}" -arch=amd64 -host_arch=x64 - # working-directory: ${{ github.workspace }}/python/src/magtense/lib/ - # run: | - # call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" - # make cmdx64 + - name: Link Cuda wrapper with Developer PowerShell for VS 2022 + shell: pwsh -NoExit -ExecutionPolicy ByPass -File {0} + run: | + cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\" + .\Launch-VsDevShell.ps1 + cd ${{ github.workspace }}/source/MagTenseFortranCuda/cuda + make wrap + + - name: Build Python wrapper in x64 Native Tools Command Prompt for VS 2022 + shell: cmd /k "{0}" -arch=amd64 -host_arch=x64 + working-directory: ${{ github.workspace }}/python/src/magtense/lib/ + run: | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" + make cmdx64 - name: Install local magtense package with pip run: python -m pip install -e ${{ github.workspace }}/python