Skip to content

Commit

Permalink
[pypi] CI maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
fradav committed May 15, 2024
1 parent c84c963 commit 837f865
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 259 deletions.
90 changes: 0 additions & 90 deletions .github/workflows/build.yml

This file was deleted.

46 changes: 25 additions & 21 deletions .github/workflows/standalone.yml → .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ on: [push]
env:
VCPKG_REVISION: "943c5ef1c8f6b5e6ced092b242c8299caae2ff01"
PMM_VERSION: "2.1.0"
MKL_VERSION: "2024.1"

jobs:
create_release:
if: ${{ !contains(toJSON(github.event.commits.*.message), '[skip-ci]') }}
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.new_release.outputs.upload_url }}
new_tag: ${{ steps.bump_version.outputs.new_tag }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Bump version and push tag
Expand Down Expand Up @@ -45,14 +46,14 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: windows-latest
shortos: windows
cmakeargs: -DTEST:BOOL=FALSE -DUSE_MKL:BOOL=FALSE -DMAKE_STATIC_EXE:BOOL=TRUE -DVCPKG_TARGET_TRIPLET:STRING=x64-windows-static -DCMAKE_BUILD_TYPE:STRING=Release -G Ninja
- os: ubuntu-22.04
- os: ubuntu-latest
shortos: linux
mkl-version: intel-oneapi-mkl-devel-2022.2.1
mkl-version: intel-oneapi-mkl-devel-${{ env.MKL_VERSION }}
cmakeargs: "-DTEST:BOOL=FALSE -DUSE_MKL:BOOL=TRUE -DMAKE_STATIC_EXE:BOOL=TRUE -DLAPACK_ROOT:STRING=/opt/intel/oneapi/mkl/latest/lib '-DLAPACK_LIBRARIES:STRING=-Wl,--start-group /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.a /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_tbb_thread.a /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.a -Wl,--end-group;pthread;m;dl' '-DBLAS_LIBRARIES:STRING=-Wl,--start-group /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.a /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_tbb_thread.a /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.a -Wl,--end-group;pthread;m;dl' -DCMAKE_BUILD_TYPE:STRING=Release -G Ninja"
- os: macos-latest
shortos: macos
Expand All @@ -61,17 +62,20 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: true

- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.4'
- uses: lukka/get-cmake@latest
- name: Get R version
run: echo "::set-output name=R_VERSION::$(Rscript -e 'cat(as.character(getRversion()))')"
run: echo "R_VERSION=$(Rscript -e 'cat(as.character(getRversion()))')" >> $GITHUB_OUTPUT
id: get-r-version
- name: restore/cache vcpkg/ubuntu
uses: actions/cache@v2
with:
path: /home/runner/.local/share/pmm
key: ubuntu-vcpkg-${{ env.PMM_VERSION }}-${{ env.VCPKG_REVISION }}
if: matrix.os == 'ubuntu-22.04'
if: matrix.os == 'ubuntu-latest'
- name: restore/cache vcpkg/macos
uses: actions/cache@v2
with:
Expand All @@ -89,7 +93,7 @@ jobs:
with:
path: /opt/intel
key: ${{ matrix.mkl-version }}
if: matrix.os == 'ubuntu-22.04'
if: matrix.os == 'ubuntu-latest'
- name: setup x64-linux
run: |
if [ ! -d /opt/intel/lib/intel64 ]; then
Expand All @@ -98,28 +102,28 @@ jobs:
sudo apt-get update
sudo apt-get install -y ${{ matrix.mkl-version }}
fi
echo "CC=gcc-12" >> $GITHUB_ENV
echo "CXX=g++-12" >> $GITHUB_ENV
if: matrix.os == 'ubuntu-22.04'
echo "CC=gcc-13" >> $GITHUB_ENV
echo "CXX=g++-13" >> $GITHUB_ENV
if: matrix.os == 'ubuntu-latest'
- name: setup MacOS
run: |
brew install ninja
echo "CC=gcc-11" >> $GITHUB_ENV
echo "CXX=g++-11" >> $GITHUB_ENV
echo "CC=gcc-13" >> $GITHUB_ENV
echo "CXX=g++-13" >> $GITHUB_ENV
echo "CXXFLAGS=-static-libstdc++ -static-libgcc" >> $GITHUB_ENV
if: matrix.os == 'macos-latest'
- name: Configure MSVC console (Windows)
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1.10.0
uses: ilammy/msvc-dev-cmd@v1
- name: setup windows
run: |
# Set these env vars so cmake picks the correct compiler
echo "CXX=cl.exe" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
echo "CC=cl.exe" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
if: matrix.os == 'windows-latest'
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python
if: matrix.os != 'ubuntu-22.04'
if: matrix.os != 'ubuntu-latest'
- name: Run CMake+Ninja
uses: lukka/run-cmake@v3
id: runcmake_cmd
Expand Down Expand Up @@ -157,7 +161,7 @@ jobs:
# if: "! contains( matrix.os, 'windows')"
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUPUT
shell: bash
- name: Upload Release Asset Unix
id: upload-release-asset-unix
Expand All @@ -182,14 +186,14 @@ jobs:
asset_content_type: application/octet-stream
if: matrix.os == 'windows-latest'
- name: Build wheels
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
build_sdist:
needs: [job]
name: Build source distribution
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

Expand All @@ -215,7 +219,7 @@ jobs:
upload_pypi:
needs: [job, build_sdist]
if: ${{ contains(toJSON(github.event.commits.*.message), '[pypi]') }}
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
Expand Down
81 changes: 0 additions & 81 deletions .travis.yml

This file was deleted.

5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@ if(PYABCRANGER)
set(PYBIND11PKG pybind11)
endif()

# Get VCPKG revision from env
set(VCPKG_REVISION $ENV{VCPKG_REVISION})

pmm(
VCPKG
# https://github.com/microsoft/vcpkg/pull/19665
# REVISION a69b65229b3956b7f45abd81671b7330114bcaad
# REVISION 6f7ffeb18f99796233b958aaaf14ec7bd4fb64b2
# REVISION 9d47b24eacbd1cd94f139457ef6cd35e5d92cc84
REVISION 943c5ef1c8f6b5e6ced092b242c8299caae2ff01
REVISION ${VCPKG_REVISION}
TRIPLET ${VCPKG_TARGET_TRIPLET}
REQUIRES range-v3 catch2 cxxopts fmt eigen3 ${PYBIND11PKG} ${TBBPKG} ${BOOSTREPKG} ${TESTDEPS}
)
Expand Down
16 changes: 0 additions & 16 deletions pls.md

This file was deleted.

30 changes: 0 additions & 30 deletions pybind11-nodep/portfile.cmake

This file was deleted.

Loading

0 comments on commit 837f865

Please sign in to comment.