diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index de5c9d36c7d..6827c5fe476 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -1,6 +1,13 @@ name: OSX-build -on: [push] +on: + push: + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false jobs: osx-clang-omp: @@ -15,13 +22,20 @@ jobs: steps: - uses: actions/checkout@v2 + - name: setup run: | brew install libomp + - name: info run: | g++ -v cmake --version + + - name: Debug over SSH (tmate) + uses: mxschmitt/action-tmate@v3.5 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + - name: configure run: | mkdir build @@ -29,6 +43,7 @@ jobs: cmake .. -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} make -j8 ctest -j10 --output-on-failure + - name: install run: | cd build diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml deleted file mode 100644 index 3eae206f6a9..00000000000 --- a/.github/workflows/windows-build.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: Windows-build - -on: [push] - -jobs: - windows_cuda: - strategy: - fail-fast: false - matrix: - config: - - {version: "10.2.89.20191206", name: "cuda102/release/shared"} - - {version: "latest", name: "cuda-latest/release/shared"} - name: msvc/${{ matrix.config.name }} (only compile) - runs-on: [windows-latest] - steps: - - uses: actions/checkout@v2 - - name: setup (versioned) - if: matrix.config.version != 'latest' - run: | - choco install cuda --version=${{ matrix.config.version }} -y - - name: setup (latest) - if: matrix.config.version == 'latest' - run: | - choco install cuda -y - - name: configure - run: | - $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" - refreshenv - $env:PATH="$env:PATH;$pwd\build\windows_shared_library" - mkdir build - cd build - cmake -DCMAKE_CXX_FLAGS=/bigobj -DGINKGO_BUILD_CUDA=ON -DGINKGO_BUILD_OMP=OFF -DGINKGO_CUDA_ARCHITECTURES=60 .. - cmake --build . -j4 --config Release - - windows_ref: - strategy: - fail-fast: false - matrix: - config: - - {shared: "ON", build_type: "Debug", name: "reference/debug/shared"} - - {shared: "OFF", build_type: "Release", name: "reference/release/static"} - # Debug static needs too much storage - # - {shared: "OFF", build_type: "Debug", name: "reference/debug/static"} - name: msvc/${{ matrix.config.name }} - runs-on: [windows-latest] - steps: - - uses: actions/checkout@v2 - - name: configure - run: | - $env:PATH="$env:PATH;$pwd\build\windows_shared_library" - mkdir build - cd build - cmake -DCMAKE_CXX_FLAGS=/bigobj -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_CXX_FLAGS_DEBUG="/MDd /Zi /Ob1 /Od /RTC1" -DGINKGO_BUILD_CUDA=OFF -DGINKGO_BUILD_OMP=OFF .. - cmake --build . -j4 --config ${{ matrix.config.build_type }} - ctest . -C ${{ matrix.config.build_type }} --output-on-failure - - name: install - run: | - $env:PATH="$env:PATH;C:\Program Files (x86)\Ginkgo\lib" - cd build - cmake --install . --config ${{ matrix.config.build_type }} - cmake --build . --target test_install --config ${{ matrix.config.build_type }} - windows_mingw: - strategy: - fail-fast: false - matrix: - config: - - {shared: "OFF", build_type: "Release", name: "omp/release/static", cflags: ""} - name: mingw/${{ matrix.config.name }} - runs-on: [windows-latest] - steps: - - uses: actions/checkout@v2 - - name: configure - # Use cmd to remove the path easily - run: | - bcdedit /set IncreaseUserVa 3072 - editbin /LARGEADDRESSAWARE "C:\Program Files\Git\mingw64\bin\cc1plus.exe" - path %PATH:C:\Program Files\Git\bin;=% - path %PATH:C:\Program Files\Git\usr\bin;=%;%GITHUB_WORKSPACE%\build\windows_shared_library - mkdir build - cd build - cmake -G "MinGW Makefiles" -DCMAKE_CXX_FLAGS=-Wa,-mbig-obj -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_COMPILER_FLAGS=${{ matrix.config.cflags }} .. - cmake --build . -j4 - ctest . --output-on-failure - shell: cmd - - name: install - run: | - set PATH=%PATH:C:\Program Files\Git\bin;=% - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%;C:\Program Files (x86)\Ginkgo\lib - cd build - cmake --install . - cmake --build . --target test_install - shell: cmd - - windows_cygwin: - strategy: - fail-fast: false - matrix: - config: - - {shared: "OFF", build_type: "Release", name: "omp/release/static", cflags: ""} - name: cygwin/${{ matrix.config.name }} - runs-on: [windows-latest] - steps: - - run: git config --global core.autocrlf input - - uses: actions/checkout@v2 - - name: setup - run: | - choco install cygwin -y - choco install cyg-get -y - cyg-get cmake make gcc-g++ git - - name: configure - run: | - path C:\tools\cygwin\bin;%GITHUB_WORKSPACE%\build\windows_shared_library - mkdir build - cd build - bash -c "cmake -DCMAKE_CXX_FLAGS=-Wa,-mbig-obj -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_COMPILER_FLAGS=${{ matrix.config.cflags }} .." - bash -c "make -j4" - bash -c "ctest . --output-on-failure" - shell: cmd - - name: install - run: | - path C:\tools\cygwin\bin - cd build - bash -c "make install" - bash -c "export PATH=/usr/local/lib:$PATH && make test_install" - shell: cmd diff --git a/.github/workflows/windows-cygwin.yml b/.github/workflows/windows-cygwin.yml new file mode 100644 index 00000000000..dbbba5f1e1c --- /dev/null +++ b/.github/workflows/windows-cygwin.yml @@ -0,0 +1,53 @@ +name: Windows-Cygwin + +on: + push: + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + windows_cygwin: + strategy: + fail-fast: false + matrix: + config: + - {shared: "OFF", build_type: "Release", name: "omp/release/static", cflags: ""} + name: cygwin/${{ matrix.config.name }} + runs-on: [windows-latest] + steps: + - run: git config --global core.autocrlf input + - uses: actions/checkout@v2 + + - name: setup + run: | + choco install cygwin -y + choco install cyg-get -y + cyg-get cmake make gcc-g++ git + + - name: Debug over SSH (tmate) + uses: mxschmitt/action-tmate@v3.5 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + with: + limit-access-to-actor: true + + - name: configure + run: | + path C:\tools\cygwin\bin;%GITHUB_WORKSPACE%\build\windows_shared_library + mkdir build + cd build + bash -c "cmake -DCMAKE_CXX_FLAGS=-Wa,-mbig-obj -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_COMPILER_FLAGS=${{ matrix.config.cflags }} .." + bash -c "make -j4" + bash -c "ctest . --output-on-failure" + shell: cmd + + - name: install + run: | + path C:\tools\cygwin\bin + cd build + bash -c "make install" + bash -c "export PATH=/usr/local/lib:$PATH && make test_install" + shell: cmd diff --git a/.github/workflows/windows-mingw.yml b/.github/workflows/windows-mingw.yml new file mode 100644 index 00000000000..7cfa250757b --- /dev/null +++ b/.github/workflows/windows-mingw.yml @@ -0,0 +1,51 @@ +name: Windows-MinGW + +on: + push: + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + windows_mingw: + strategy: + fail-fast: false + matrix: + config: + - {shared: "OFF", build_type: "Release", name: "omp/release/static", cflags: ""} + name: mingw/${{ matrix.config.name }} + runs-on: [windows-latest] + steps: + - uses: actions/checkout@v2 + + - name: Debug over SSH (tmate) + uses: mxschmitt/action-tmate@v3.5 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + with: + limit-access-to-actor: true + + - name: configure + # Use cmd to remove the path easily + run: | + bcdedit /set IncreaseUserVa 3072 + editbin /LARGEADDRESSAWARE "C:\Program Files\Git\mingw64\bin\cc1plus.exe" + path %PATH:C:\Program Files\Git\bin;=% + path %PATH:C:\Program Files\Git\usr\bin;=%;%GITHUB_WORKSPACE%\build\windows_shared_library + mkdir build + cd build + cmake -G "MinGW Makefiles" -DCMAKE_CXX_FLAGS=-Wa,-mbig-obj -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_COMPILER_FLAGS=${{ matrix.config.cflags }} .. + cmake --build . -j4 + ctest . --output-on-failure + shell: cmd + + - name: install + run: | + set PATH=%PATH:C:\Program Files\Git\bin;=% + set PATH=%PATH:C:\Program Files\Git\usr\bin;=%;C:\Program Files (x86)\Ginkgo\lib + cd build + cmake --install . + cmake --build . --target test_install + shell: cmd diff --git a/.github/workflows/windows-msvc-cuda.yml b/.github/workflows/windows-msvc-cuda.yml new file mode 100644 index 00000000000..bc4557e96bf --- /dev/null +++ b/.github/workflows/windows-msvc-cuda.yml @@ -0,0 +1,50 @@ +name: Windows-MSVC-CUDA (compile-only) + +on: + push: + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + windows_cuda: + strategy: + fail-fast: false + matrix: + config: + - {version: "10.2.89.20191206", name: "cuda102/release/shared"} + - {version: "latest", name: "cuda-latest/release/shared"} + name: msvc/${{ matrix.config.name }} (only compile) + runs-on: [windows-latest] + + steps: + - uses: actions/checkout@v2 + - name: setup (versioned) + if: matrix.config.version != 'latest' + run: | + choco install cuda --version=${{ matrix.config.version }} -y + + - name: setup (latest) + if: matrix.config.version == 'latest' + run: | + choco install cuda -y + + - name: Debug over SSH (tmate) + uses: mxschmitt/action-tmate@v3.5 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + with: + limit-access-to-actor: true + + - name: configure + run: | + $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." + Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" + refreshenv + $env:PATH="$env:PATH;$pwd\build\windows_shared_library" + mkdir build + cd build + cmake -DCMAKE_CXX_FLAGS=/bigobj -DGINKGO_BUILD_CUDA=ON -DGINKGO_BUILD_OMP=OFF -DGINKGO_CUDA_ARCHITECTURES=60 .. + cmake --build . -j4 --config Release diff --git a/.github/workflows/windows-msvc-ref.yml b/.github/workflows/windows-msvc-ref.yml new file mode 100644 index 00000000000..13a29f6cc51 --- /dev/null +++ b/.github/workflows/windows-msvc-ref.yml @@ -0,0 +1,47 @@ +name: Windows-MSVC-Reference + +on: + push: + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + windows_ref: + strategy: + fail-fast: false + matrix: + config: + - {shared: "ON", build_type: "Debug", name: "reference/debug/shared"} + - {shared: "OFF", build_type: "Release", name: "reference/release/static"} + # Debug static needs too much storage + # - {shared: "OFF", build_type: "Debug", name: "reference/debug/static"} + name: msvc/${{ matrix.config.name }} + runs-on: [windows-latest] + steps: + - uses: actions/checkout@v2 + + - name: Debug over SSH (tmate) + uses: mxschmitt/action-tmate@v3.5 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + with: + limit-access-to-actor: true + + - name: configure + run: | + $env:PATH="$env:PATH;$pwd\build\windows_shared_library" + mkdir build + cd build + cmake -DCMAKE_CXX_FLAGS=/bigobj -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_CXX_FLAGS_DEBUG="/MDd /Zi /Ob1 /Od /RTC1" -DGINKGO_BUILD_CUDA=OFF -DGINKGO_BUILD_OMP=OFF .. + cmake --build . -j4 --config ${{ matrix.config.build_type }} + ctest . -C ${{ matrix.config.build_type }} --output-on-failure + + - name: install + run: | + $env:PATH="$env:PATH;C:\Program Files (x86)\Ginkgo\lib" + cd build + cmake --install . --config ${{ matrix.config.build_type }} + cmake --build . --target test_install --config ${{ matrix.config.build_type }}