diff options
author | Roman Grundkiewicz <rgrundkiewicz@gmail.com> | 2021-03-17 16:21:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-17 16:21:47 +0300 |
commit | 77c3e356a47113f661dda794b815e84561ca93f5 (patch) | |
tree | 715aba7e774bdb46769daf39b7acaa8152ab389e /.github | |
parent | bb92b817dd5140523af9e4d756a34c2092d03e32 (diff) |
Install Boost in GitHub workflows (#834)
* Install Boost in workflows
* Compile CUDA realease for all GPU archs
* Convert line endings to LF
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/macos.yml | 2 | ||||
-rw-r--r-- | .github/workflows/release.yml | 534 | ||||
-rw-r--r-- | .github/workflows/ubuntu.yml | 13 | ||||
-rw-r--r-- | .github/workflows/windows.yml | 19 |
4 files changed, 284 insertions, 284 deletions
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ee955266..5e3e57c6 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -18,7 +18,7 @@ jobs: submodules: recursive - name: Install dependencies - run: brew install openblas protobuf + run: brew install boost openblas openssl protobuf # Openblas location is exported explicitly because openblas is keg-only, # which means it was not symlinked into /usr/local/. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad84360f..636340b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,268 +1,266 @@ -# This workflow builds packages with Marian executables and then attaches them
-# to an existing GitHub release or drafts a new release if needed.
-# There are two ways of utilizing the workflow:
-#
-# 1. Create a new tag locally and push it to the remote, for example:
-#
-# git tag 1.2.3
-# git push origin 1.2.3
-#
-# The workflow, if built successfully, will open a new draft release (not seen
-# for the public, available from under the /releases subpage on GitHub), use
-# the last unreleased changes from CHANGELOG as the release description, and
-# attach built packages as assets. Until the draft release is not published,
-# the tag will be separated from the release, but they get merged into a single
-# item with all assets. An admin user need to manually publish the draft
-# release then. (Note: this behavior can be easily changed if needed).
-#
-# 2. Publish a new (non-draft) release with a tag via GitHub web interface. The
-# workflow, if built successfully, will only attach built packages as
-# additional assets. It is the responsibility of an admin user to add
-# description to the release if it was not provided before..
-#
-name: Release
-
-# The job is triggered by pushing a tag that follows the given pattern name
-on:
- push:
- tags:
- - "[0-9]+.[0-9]+.[0-9]+*"
-
-env:
- cuda_version: "10.2"
- gcc_version: 8
-
-jobs:
- ######################################################################
- build-release-ubuntu:
- strategy:
- matrix:
- include:
- # No builds with FBGEMM because they are not portable enough
- # requiring same CPU architecture at compilation and runtime
- - name: "Build Ubuntu CPU"
- suffix: cpu
- fbgemm: false
- cuda: false
- - name: "Build Ubuntu CPU+CUDA"
- suffix: cuda10.2
- fbgemm: false
- cuda: true
-
- runs-on: ubuntu-18.04
- name: ${{ matrix.name }}
-
- steps:
- # Set env.github_tag_name and env.archive_name for subsequent steps
- - name: Archive name
- run: |
- # Get the tag name only to use it in the archive name. The variable github.ref can not be used because it starts with refs/tags/
- TAG_NAME=$(echo ${{ github.ref }} | cut -d/ -f3-)
- # https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
- echo "::set-env name=github_tag_name::${TAG_NAME}"
- echo "::set-env name=archive_name::${{ github.event.repository.name }}-${TAG_NAME}_linux-x64-static_${{ matrix.suffix }}"
- shell: bash
-
- - name: Checkout
- uses: actions/checkout@v2
- with:
- submodules: recursive
-
- # The following packages are already installed on GitHub-hosted runners: build-essential openssl libssl-dev
- # No need to install libprotobuf{17,10,9v5} on Ubuntu {20,18,16}.04 because it is installed together with libprotobuf-dev
- - name: Install dependencies
- run: sudo apt-get install -y libgoogle-perftools-dev libprotobuf-dev protobuf-compiler
-
- # https://software.intel.com/content/www/us/en/develop/articles/installing-intel-free-libs-and-python-apt-repo.html
- - name: Install MKL
- run: |
- wget -qO- "https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB" | sudo apt-key add -
- sudo sh -c "echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list"
- sudo apt-get update -o Dir::Etc::sourcelist="/etc/apt/sources.list.d/intel-mkl.list"
- sudo apt-get install -y --no-install-recommends intel-mkl-64bit-2020.0-088
- # The script simplifies installation of different versions of CUDA
- - name: Install CUDA
- run: ./scripts/ci/install_cuda_ubuntu.sh ${{ env.cuda_version }}
- if: matrix.cuda == true
-
- # Boost is already installed on GitHub-hosted runners in a non-standard location
- # https://github.com/actions/virtual-environments/issues/687#issuecomment-610471671
- - name: Configure CMake
- run: |
- mkdir -p build
- cd build
- CC=/usr/bin/gcc-${{ env.gcc_version }} CXX=/usr/bin/g++-${{ env.gcc_version }} CUDAHOSTCXX=/usr/bin/g++-${{ env.gcc_version }} \
- cmake .. \
- -DBoost_ARCHITECTURE=-x64 \
- -DBOOST_INCLUDEDIR=$BOOST_ROOT_1_69_0/include \
- -DBOOST_LIBRARYDIR=$BOOST_ROOT_1_69_0/lib \
- -DBOOST_ROOT=$BOOST_ROOT_1_69_0 \
- -DCMAKE_BUILD_TYPE=Slim \
- -DCOMPILE_CPU=on \
- -DCOMPILE_CUDA=${{ matrix.cuda }} \
- -DCOMPILE_SERVER=on \
- -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-${{ env.cuda_version }} \
- -DUSE_FBGEMM=${{ matrix.fbgemm }} \
- -DUSE_SENTENCEPIECE=on \
- -DUSE_STATIC_LIBS=on \
- - name: Compile
- working-directory: build
- run: make -j2
-
- - name: Create archive
- working-directory: build
- run: tar zcvf ../${{ env.archive_name }}.tar.gz marian* ../README.md
-
- # For testing only
- #- name: Test archive
- #run: tar zcvf ${{ env.archive_name }}.tar.gz README.md
-
- - name: Upload archive
- uses: actions/upload-artifact@v2
- with:
- name: ${{ env.archive_name }}.tar.gz
- path: ${{ env.archive_name }}.tar.gz
-
- ######################################################################
- build-release-windows:
- strategy:
- matrix:
- include:
- # No builds with FBGEMM because they are not portable enough
- # requiring same CPU architecture at compilation and runtime
- - name: "Build Windows CPU"
- suffix: cpu
- fbgemm: false
- cuda: false
- - name: "Build Windows CPU+CUDA"
- suffix: cuda10.2
- fbgemm: false
- cuda: true
-
- runs-on: windows-2019
- name: ${{ matrix.name }}
-
- steps:
- # Set env.github_tag_name and env.archive_name for subsequent steps
- - name: Archive name
- run: |
- # Get the tag name only to use it in the archive name. The variable github.ref can not be used because it starts with refs/tags/
- TAG_NAME=$(echo ${{ github.ref }} | cut -d/ -f3-)
- # https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
- echo "::set-env name=github_tag_name::${TAG_NAME}"
- echo "::set-env name=archive_name::${{ github.event.repository.name }}-${TAG_NAME}_windows-x64_${{ matrix.suffix }}"
- shell: bash
-
- - name: Checkout
- uses: actions/checkout@v2
- with:
- submodules: recursive
-
- - name: Download MKL
- run: |
- C:\msys64\usr\bin\wget.exe -nv https://romang.blob.core.windows.net/mariandev/ci/mkl-2020.1-windows-static.zip -O mkl.zip
- Expand-Archive -Force mkl.zip ${{ github.workspace }}\mkl
- # Set the MKLROOT environment variable so that CMake can find MKL.
- # GITHUB_WORKSPACE is an environment variable available on all GitHub-hosted runners
- echo "::set-env name=MKLROOT::$env:GITHUB_WORKSPACE/mkl"
- shell: powershell
-
- - name: Install CUDA
- run: |
- .\scripts\ci\install_cuda_windows.ps1 '${{ env.cuda_version }}'
- # Set path to CUDA for subsequent steps so that CMake can find it
- echo "::set-env name=CUDA_PATH::$env:CUDA_PATH"
- echo "::add-path::$env:CUDA_PATH/bin"
- shell: powershell
- if: matrix.cuda == true
-
- - name: Prepare vcpkg
- uses: lukka/run-vcpkg@v2
- with:
- vcpkgArguments: protobuf
- vcpkgGitCommitId: 6185aa76504a5025f36754324abf307cc776f3da
- vcpkgDirectory: ${{ github.workspace }}/vcpkg/
- vcpkgTriplet: x64-windows-static
-
- # Build with a simplified CMake settings JSON file
- - name: Run CMake
- uses: lukka/run-cmake@v2
- with:
- buildDirectory: ${{ github.workspace }}/build/
- cmakeAppendedArgs: '-G Ninja
- -DCMAKE_BUILD_TYPE="Release"
- -DOPENSSL_USE_STATIC_LIBS="TRUE"
- -DOPENSSL_MSVC_STATIC_RT="TRUE"
- -DCOMPILE_CPU="TRUE"
- -DCOMPILE_CUDA="${{ matrix.cuda }}"
- -DCOMPILE_SERVER="FALSE"
- -DUSE_FBGEMM="${{ matrix.fbgemm }}"
- -DUSE_MPI="FALSE"
- -DUSE_NCCL="FALSE"
- -DUSE_SENTENCEPIECE="TRUE"
- -DUSE_STATIC_LIBS="TRUE"'
- cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
- cmakeListsTxtPath: ${{ github.workspace }}/CMakeLists.txt
- useVcpkgToolchainFile: true
-
- - name: Create archive
- run: |
- cp ../README.md .
- Compress-Archive -Path marian*.exe,README.md -DestinationPath ../${{ env.archive_name }}.zip
- shell: powershell
- working-directory: build
-
- # For testing only
- #- name: Test archive
- #run: |
- #Compress-Archive -Path README.md -DestinationPath ${{ env.archive_name }}.zip
- #shell: powershell
-
- - name: Upload archive
- uses: actions/upload-artifact@v2
- with:
- name: ${{ env.archive_name }}.zip
- path: ${{ env.archive_name }}.zip
-
- ######################################################################
- release:
- needs: [build-release-ubuntu, build-release-windows]
-
- runs-on: ubuntu-18.04
- name: Release
-
- steps:
- - name: Checkout
- uses: actions/checkout@v2
- with:
- submodules: false # the repo is needed only for CHANGELOG, so submodules are not needed
-
- # Extract entire markdown text from the [Unreleased] section to be used as the release description
- - name: Extract changelog
- run: |
- cat CHANGELOG.md | sed -n "/^## \[Unreleased\]/,/^## \[[0-9]/p;/^## \[[0-9]/q" | sed '1d;$d' > RELEASE.md
- cat RELEASE.md
- # Downloads all artifacts to the current working directory
- - name: Download archives
- uses: actions/download-artifact@v2
-
- # Artifacts are downloaded into directories with the same names as actual files.
- # They are moved to a common directory ./assets/
- - name: Prepare archives
- run: |
- mkdir -p assets
- mv ${{ github.event.repository.name }}-*/* assets/
- rmdir ${{ github.event.repository.name }}-*
- ls -lh assets/
- - name: Release
- uses: softprops/action-gh-release@v1
- if: startsWith(github.ref, 'refs/tags/')
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- body_path: RELEASE.md
- draft: true
- files: |
- assets/*.zip
- assets/*.tar.gz
- prerelease: false
+# This workflow builds packages with Marian executables and then attaches them +# to an existing GitHub release or drafts a new release if needed. +# There are two ways of utilizing the workflow: +# +# 1. Create a new tag locally and push it to the remote, for example: +# +# git tag 1.2.3 +# git push origin 1.2.3 +# +# The workflow, if built successfully, will open a new draft release (not seen +# for the public, available from under the /releases subpage on GitHub), use +# the last unreleased changes from CHANGELOG as the release description, and +# attach built packages as assets. Until the draft release is not published, +# the tag will be separated from the release, but they get merged into a single +# item with all assets. An admin user need to manually publish the draft +# release then. (Note: this behavior can be easily changed if needed). +# +# 2. Publish a new (non-draft) release with a tag via GitHub web interface. The +# workflow, if built successfully, will only attach built packages as +# additional assets. It is the responsibility of an admin user to add +# description to the release if it was not provided before.. +# +name: Release + +# The job is triggered by pushing a tag that follows the given pattern name +on: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]+*" + +env: + cuda_version: "10.2" + gcc_version: 8 + +jobs: + ###################################################################### + build-release-ubuntu: + strategy: + matrix: + include: + # No builds with FBGEMM because they are not portable enough + # requiring same CPU architecture at compilation and runtime + - name: "Build Ubuntu CPU" + suffix: cpu + fbgemm: false + cuda: false + - name: "Build Ubuntu CPU+CUDA" + suffix: cuda10.2 + fbgemm: false + cuda: true + + runs-on: ubuntu-18.04 + name: ${{ matrix.name }} + + steps: + # Set env.github_tag_name and env.archive_name for subsequent steps + - name: Archive name + run: | + # Get the tag name only to use it in the archive name. The variable github.ref can not be used because it starts with refs/tags/ + TAG_NAME=$(echo ${{ github.ref }} | cut -d/ -f3-) + # https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable + echo "::set-env name=github_tag_name::${TAG_NAME}" + echo "::set-env name=archive_name::${{ github.event.repository.name }}-${TAG_NAME}_linux-x64-static_${{ matrix.suffix }}" + shell: bash + + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + + # The following packages are already installed on GitHub-hosted runners: build-essential openssl libssl-dev + # No need to install libprotobuf{17,10,9v5} on Ubuntu {20,18,16}.04 because it is installed together with libprotobuf-dev + # Boost is no longer pre-installed on GitHub-hosted runners + - name: Install dependencies + run: sudo apt-get install -y libgoogle-perftools-dev libprotobuf-dev protobuf-compiler libboost-system-dev + + # https://software.intel.com/content/www/us/en/develop/articles/installing-intel-free-libs-and-python-apt-repo.html + - name: Install MKL + run: | + wget -qO- "https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB" | sudo apt-key add - + sudo sh -c "echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list" + sudo apt-get update -o Dir::Etc::sourcelist="/etc/apt/sources.list.d/intel-mkl.list" + sudo apt-get install -y --no-install-recommends intel-mkl-64bit-2020.0-088 + # The script simplifies installation of different versions of CUDA + - name: Install CUDA + run: ./scripts/ci/install_cuda_ubuntu.sh ${{ env.cuda_version }} + if: matrix.cuda == true + + - name: Configure CMake + run: | + mkdir -p build + cd build + CC=/usr/bin/gcc-${{ env.gcc_version }} CXX=/usr/bin/g++-${{ env.gcc_version }} CUDAHOSTCXX=/usr/bin/g++-${{ env.gcc_version }} \ + cmake .. \ + -DBoost_ARCHITECTURE=-x64 \ + -DCMAKE_BUILD_TYPE=Slim \ + -DCOMPILE_CPU=on \ + -DCOMPILE_CUDA=${{ matrix.cuda }} \ + -DCOMPILE_KEPLER=${{ matrix.cuda }} \ + -DCOMPILE_MAXWELL=${{ matrix.cuda }} \ + -DCOMPILE_SERVER=on \ + -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-${{ env.cuda_version }} \ + -DUSE_FBGEMM=${{ matrix.fbgemm }} \ + -DUSE_SENTENCEPIECE=on \ + -DUSE_STATIC_LIBS=on \ + - name: Compile + working-directory: build + run: make -j2 + + - name: Create archive + working-directory: build + run: tar zcvf ../${{ env.archive_name }}.tar.gz marian* ../README.md + + # For testing only + #- name: Test archive + #run: tar zcvf ${{ env.archive_name }}.tar.gz README.md + + - name: Upload archive + uses: actions/upload-artifact@v2 + with: + name: ${{ env.archive_name }}.tar.gz + path: ${{ env.archive_name }}.tar.gz + + ###################################################################### + build-release-windows: + strategy: + matrix: + include: + # No builds with FBGEMM because they are not portable enough + # requiring same CPU architecture at compilation and runtime + - name: "Build Windows CPU" + suffix: cpu + fbgemm: false + cuda: false + - name: "Build Windows CPU+CUDA" + suffix: cuda10.2 + fbgemm: false + cuda: true + + runs-on: windows-2019 + name: ${{ matrix.name }} + + steps: + # Set env.github_tag_name and env.archive_name for subsequent steps + - name: Archive name + run: | + # Get the tag name only to use it in the archive name. The variable github.ref can not be used because it starts with refs/tags/ + TAG_NAME=$(echo ${{ github.ref }} | cut -d/ -f3-) + # https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable + echo "::set-env name=github_tag_name::${TAG_NAME}" + echo "::set-env name=archive_name::${{ github.event.repository.name }}-${TAG_NAME}_windows-x64_${{ matrix.suffix }}" + shell: bash + + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Download MKL + run: | + C:\msys64\usr\bin\wget.exe -nv https://romang.blob.core.windows.net/mariandev/ci/mkl-2020.1-windows-static.zip -O mkl.zip + Expand-Archive -Force mkl.zip ${{ github.workspace }}\mkl + # Set the MKLROOT environment variable so that CMake can find MKL. + # GITHUB_WORKSPACE is an environment variable available on all GitHub-hosted runners + echo "::set-env name=MKLROOT::$env:GITHUB_WORKSPACE/mkl" + shell: powershell + + - name: Install CUDA + run: | + .\scripts\ci\install_cuda_windows.ps1 '${{ env.cuda_version }}' + # Set path to CUDA for subsequent steps so that CMake can find it + echo "::set-env name=CUDA_PATH::$env:CUDA_PATH" + echo "::add-path::$env:CUDA_PATH/bin" + shell: powershell + if: matrix.cuda == true + + - name: Prepare vcpkg + uses: lukka/run-vcpkg@v2 + with: + vcpkgArguments: protobuf + vcpkgGitCommitId: 6185aa76504a5025f36754324abf307cc776f3da + vcpkgDirectory: ${{ github.workspace }}/vcpkg/ + vcpkgTriplet: x64-windows-static + + # Build with a simplified CMake settings JSON file + - name: Run CMake + uses: lukka/run-cmake@v2 + with: + buildDirectory: ${{ github.workspace }}/build/ + cmakeAppendedArgs: '-G Ninja + -DCMAKE_BUILD_TYPE="Release" + -DOPENSSL_USE_STATIC_LIBS="TRUE" + -DOPENSSL_MSVC_STATIC_RT="TRUE" + -DCOMPILE_CPU="TRUE" + -DCOMPILE_CUDA="${{ matrix.cuda }}" + -DCOMPILE_SERVER="FALSE" + -DUSE_FBGEMM="${{ matrix.fbgemm }}" + -DUSE_MPI="FALSE" + -DUSE_NCCL="FALSE" + -DUSE_SENTENCEPIECE="TRUE" + -DUSE_STATIC_LIBS="TRUE"' + cmakeListsOrSettingsJson: CMakeListsTxtAdvanced + cmakeListsTxtPath: ${{ github.workspace }}/CMakeLists.txt + useVcpkgToolchainFile: true + + - name: Create archive + run: | + cp ../README.md . + Compress-Archive -Path marian*.exe,README.md -DestinationPath ../${{ env.archive_name }}.zip + shell: powershell + working-directory: build + + # For testing only + #- name: Test archive + #run: | + #Compress-Archive -Path README.md -DestinationPath ${{ env.archive_name }}.zip + #shell: powershell + + - name: Upload archive + uses: actions/upload-artifact@v2 + with: + name: ${{ env.archive_name }}.zip + path: ${{ env.archive_name }}.zip + + ###################################################################### + release: + needs: [build-release-ubuntu, build-release-windows] + + runs-on: ubuntu-18.04 + name: Release + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: false # the repo is needed only for CHANGELOG, so submodules are not needed + + # Extract entire markdown text from the [Unreleased] section to be used as the release description + - name: Extract changelog + run: | + cat CHANGELOG.md | sed -n "/^## \[Unreleased\]/,/^## \[[0-9]/p;/^## \[[0-9]/q" | sed '1d;$d' > RELEASE.md + cat RELEASE.md + # Downloads all artifacts to the current working directory + - name: Download archives + uses: actions/download-artifact@v2 + + # Artifacts are downloaded into directories with the same names as actual files. + # They are moved to a common directory ./assets/ + - name: Prepare archives + run: | + mkdir -p assets + mv ${{ github.event.repository.name }}-*/* assets/ + rmdir ${{ github.event.repository.name }}-* + ls -lh assets/ + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body_path: RELEASE.md + draft: true + files: | + assets/*.zip + assets/*.tar.gz + prerelease: false diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index b6b69f14..9aad8ffd 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -67,12 +67,11 @@ jobs: with: submodules: recursive - # The following packages are already installed on GitHub-hosted runners: - # build-essential openssl libssl-dev - # No need to install libprotobuf{17,10,9v5} on Ubuntu {20,18,16}.04 because - # it is installed together with libprotobuf-dev + # The following packages are already installed on GitHub-hosted runners: build-essential openssl libssl-dev + # No need to install libprotobuf{17,10,9v5} on Ubuntu {20,18,16}.04 because it is installed together with libprotobuf-dev + # Boost is no longer pre-installed on GitHub-hosted runners - name: Install dependencies - run: sudo apt-get install -y libgoogle-perftools-dev libprotobuf-dev protobuf-compiler + run: sudo apt-get install -y libgoogle-perftools-dev libprotobuf-dev protobuf-compiler libboost-system-dev # https://software.intel.com/content/www/us/en/develop/articles/installing-intel-free-libs-and-python-apt-repo.html - name: Install MKL @@ -88,7 +87,6 @@ jobs: run: ./scripts/ci/install_cuda_ubuntu.sh ${{ matrix.cuda }} if: matrix.gpu == true - # Boost is installed on GitHub-hosted runners in a non-standard location # https://github.com/actions/virtual-environments/issues/687#issuecomment-610471671 - name: Configure CMake run: | @@ -97,9 +95,6 @@ jobs: CC=/usr/bin/gcc-${{ matrix.gcc }} CXX=/usr/bin/g++-${{ matrix.gcc }} CUDAHOSTCXX=/usr/bin/g++-${{ matrix.gcc }} \ cmake .. \ -DBoost_ARCHITECTURE=-x64 \ - -DBOOST_INCLUDEDIR=$BOOST_ROOT_1_72_0/include \ - -DBOOST_LIBRARYDIR=$BOOST_ROOT_1_72_0/lib \ - -DBOOST_ROOT=$BOOST_ROOT_1_72_0 \ -DCMAKE_BUILD_TYPE=Release \ -DCOMPILE_CPU=${{ matrix.cpu }} \ -DCOMPILE_CUDA=${{ matrix.gpu }} \ diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 648887ae..dd10c733 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -8,6 +8,8 @@ on: env: MKL_URL: "https://romang.blob.core.windows.net/mariandev/ci/mkl-2020.1-windows-static.zip" + BOOST_ROOT: "C:/hostedtoolcache/windows/Boost/1.72.0/x86_64" + BOOST_URL: "https://sourceforge.net/projects/boost/files/boost-binaries/1.72.0/boost_1_72_0-msvc-14.2-64.exe" jobs: build-windows: @@ -50,6 +52,14 @@ jobs: shell: powershell if: matrix.gpu == true + # Boost is no longer pre-installed on GitHub-hosted Windows runners + - name: Download Boost + run: | + Write-Host "Downloading Boost to ${{ env.BOOST_ROOT }}" + C:\msys64\usr\bin\wget.exe -nv "${{ env.BOOST_URL }}" -O "${{ github.workspace }}/boost.exe" + Start-Process -Wait -FilePath "${{ github.workspace }}/boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=${{ env.BOOST_ROOT }}" + shell: powershell + - name: Prepare vcpkg uses: lukka/run-vcpkg@v4 with: @@ -85,17 +95,14 @@ jobs: if: matrix.gpu == true # Windows CUDA builds use USE_NCCL=off due to compilation errors - # Boost is pre-installed on Azure/GitHub-hosted Windows runners - # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#boost - # (not used yet) - name: Build Release uses: lukka/run-cmake@v3 with: buildDirectory: ${{ github.workspace }}/build/ cmakeAppendedArgs: '-G Ninja - -DBOOST_ROOT="$(BOOST_ROOT_1_72_0)" - -DBOOST_INCLUDEDIR="$(BOOST_ROOT_1_72_0)/include" - -DBOOST_LIBRARYDIR="$(BOOST_ROOT_1_72_0)/lib" + -DBOOST_ROOT="${{ env.BOOST_ROOT }}" + -DBOOST_INCLUDEDIR="${{ env.BOOST_ROOT }}/include" + -DBOOST_LIBRARYDIR="${{ env.BOOST_ROOT }}/lib" -DCMAKE_BUILD_TYPE="Release" -DOPENSSL_USE_STATIC_LIBS="TRUE" -DOPENSSL_MSVC_STATIC_RT="TRUE" |