Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #505
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build esig | |
on: | |
push: | |
branches: | |
- release | |
- develop | |
paths-ignore: | |
- 'examples/**' | |
- 'doc/**' | |
- README.md | |
pull_request: | |
branches: | |
- develop | |
types: [ opened, reopened, synchronize] | |
env: | |
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ | |
windows-2019, | |
macos-11, | |
ubuntu-20.04 | |
] | |
include: | |
- os: 'windows-2019' | |
mono: '' | |
- os: 'macos-11' | |
mono: 'mono' | |
- os: 'ubuntu-20.04' | |
mono: 'mono' | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Checkout recombine | |
id: clone_recombine | |
uses: actions/checkout@v3 | |
with: | |
repository: terrylyons/recombine | |
ref: develop | |
token: ${{ secrets.recombine_login }} | |
path: build/recombine | |
# https://github.com/microsoft/vcpkg/blob/master/docs/users/binarycaching.md | |
- name: Setup submodule vcpkg | |
shell: bash | |
if: runner.os != 'Linux' | |
run: | | |
rm -rf "$VCPKG_INSTALLATION_ROOT" | |
./build/vcpkg/bootstrap-vcpkg.sh | |
${{ matrix.mono }} `build/vcpkg/vcpkg fetch nuget | tail -n 1` \ | |
sources add \ | |
-source "https://nuget.pkg.github.com/datasig-ac-uk/index.json" \ | |
-storepasswordincleartext \ | |
-name "GitHub" \ | |
-username "datasig-ac-uk" \ | |
-password "${{ secrets.GITHUB_TOKEN }}" | |
# In the future, this can be replaced by a download of the binary | |
# - name: Get recombine | |
# id: clone_recombine | |
# run: | | |
# bash ./build/git-preamble.sh | |
# continue-on-error: true | |
# env: | |
# RECOMBINE_USER: rolyp | |
# RECOMBINE_TOKEN: ${{ secrets.recombine_login }} | |
# - name: MKL Cache | |
# id: mkl-cache-get-windows | |
# if: runner.os == 'Windows' | |
# uses: pat-s/[email protected] | |
# with: | |
# key: ${{ runner.os }}-oneapi-dir | |
# path: | | |
# !C:/Program Files (x86)/Intel/oneAPI/Installer/** | |
# C:/Program Files (x86)/Intel/oneAPI | |
# !C:/Program Files (x86)/Intel/oneAPI/conda_channel/** | |
- name: Get MKL | |
id: get-mkl-windows | |
if: runner.os == 'Windows' # && steps.mkl-cache-get-windows.outputs.cache-hit != 'true' | |
shell: bash | |
run: | | |
curl -v -o /d/a/intel-mkl-installer.exe "$URL" | |
/d/a/intel-mkl-installer.exe -s -x -f /d/a/webimage_extracted --log extract.log | |
rm -v /d/a/intel-mkl-installer.exe | |
/d/a/webimage_extracted/bootstrapper.exe -s --action install --config ./build/oneapi-install-config-x64-windows.ini --log-dir=. | |
curl -v -o /d/a/intel-mkl-installer-x86.exe "$URL32" | |
/d/a/intel-mkl-installer-x86.exe -s -x -f /d/a/webimage_extracted_x86 --log extractx86.log | |
rm -v /d/a/intel-mkl-installer-x86.exe | |
/d/a/webimage_extracted_x86/bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=. --ignore-errors | |
env: | |
URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18599/w_BaseKit_p_2022.1.3.210.exe | |
URL32: https://registrationcenter-download.intel.com/akdlm/irc_nas/18599/w_BaseKit_32bit_p_2022.1.3.44.exe | |
- name: Set MKL vars | |
if: runner.os == 'Windows' | |
shell: bash | |
# run: | | |
# @call "C:/Program Files (x86)/Intel/oneAPI/setvars.bat" | |
# set | |
# echo "MKLROOT=%MKLROOT%" >> %GITHUB_ENV% | |
run: | | |
echo "CMAKE_PREFIX_PATH=C:/Program Files (x86)/Intel/oneAPI/mkl/2022.0.3" >> $GITHUB_ENV | |
echo "ONEAPI_SCRIPT=C:/Progam Files (x86)/Intel/oneAPI/setvars.bat" >> $GITHUB_ENV | |
- name: Get MKL Mac | |
id: get-mkl-Mac | |
if: runner.os == 'macOS' && steps.clone_recombine.outcome == 'success' | |
run: | | |
curl -v -o OAPI_installer.dmg "$URL" | |
sudo hdiutil attach OAPI_installer.dmg -quiet | |
pushd /Volumes/"$(basename "$URL" .dmg)"/bootstrapper.app/Contents/MacOs | |
sudo ./install.sh --silent --eula accept --components intel.oneapi.mac.mkl.devel | |
popd | |
sudo hdiutil detach /Volumes/"$(basename "$URL" .dmg)" -quiet | |
echo "oneapi_root=/opt/intel/oneapi" >> $GITHUB_ENV | |
echo "ONEAPI_SCRIPT=/opt/intel/oneapi/setvars.sh" >> $GITHUB_ENV | |
echo "MKLROOT=/opt/intel/oneapi/mkl/latest" >> $GITHUB_ENV | |
env: | |
URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18342/m_BaseKit_p_2022.1.0.92.dmg | |
# - name: cache-boost-windows | |
# id: cache-boost-windows | |
# uses: pat-s/[email protected] | |
# if: runner.os == 'Windows' | |
# with: | |
# path: C:/vcpkg/packages | |
# key: win-boost-packages | |
- name: Get Boost Windows | |
id: boost-windows | |
shell: bash | |
run: | | |
build/vcpkg/vcpkg install boost-system boost-thread boost-container boost-multiprecision --triplet x86-windows | |
build/vcpkg/vcpkg install boost-system boost-thread boost-container boost-multiprecision --triplet x64-windows | |
if: runner.os == 'Windows' && steps.cache-boost-windows.outputs.cache-hit != 'true' | |
env: | |
VCPKG_KEEP_ENV_VARS: "MKLROOT" | |
- name: Get Boost macos | |
id: boost-macos | |
run: | | |
find /usr/lib -name omp | |
brew install boost | |
brew install ninja | |
if: runner.os == 'macOS' | |
# - name: Build Recombine | |
# id: build-recombine | |
# if: steps.clone_recombine.outcome == 'success' && runner.os != 'Linux' | |
# run: | | |
# source ${{ env.oneapi_script }} | |
# pushd build/recombine | |
# cmake -S . -B recombine_build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../esig | |
# cmake --install recombine_build | |
# popd | |
# echo "recombine_prefix=$(pwd)/esig" >> $GITHUB_ENV | |
# env: | |
# MKLROOT: ${{ env.MKLROOT }} | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
VERBOSE: 1 | |
BOOST_ROOT: ${{ env.boost_root }} | |
- name: Cache outputs | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '>=3.8' | |
- name: Install Build deps | |
run: python -m pip install setuptools build | |
# - name: Check version updated | |
# - name: Copy manifest into main dir | |
# run: cp build/MANIFEST.in . | |
- name: Build source distribution | |
run: python -m build --sdist . | |
- name: Cache sdist | |
uses: actions/upload-artifact@v2 | |
with: | |
name: sdist | |
path: dist/*.tar.gz | |
# - name: Create GitHub release | |
# run: | | |
# gh release create "v$(<esig/VERSION)" ./dist/*.whl | |
publish: | |
runs-on: ubuntu-latest | |
needs: [ build_wheels, build_sdist ] | |
if: github.ref == 'refs/heads/release' | |
steps: | |
- name: Setup python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '>=3.8' | |
- name: Install Build deps | |
run: python -m pip install setuptools build twine | |
- name: Retrieve sdist | |
uses: actions/[email protected] | |
with: | |
name: sdist | |
path: dist | |
- name: Retrieve wheels | |
uses: actions/[email protected] | |
with: | |
name: wheels | |
path: dist | |
- name: Publish | |
run: | | |
python -m twine upload dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.pypi_password }} |