Skip to content

Commit

Permalink
Merge pull request #175 from bluescarni/pr/ci_updates
Browse files Browse the repository at this point in the history
CI updates
  • Loading branch information
bluescarni authored Apr 30, 2024
2 parents ae06a59 + ccdd4af commit ee0d8df
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 114 deletions.
12 changes: 0 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@ jobs:
- run:
name: Build and test
command: bash ./tools/circleci_conda_heyoka_head_312.sh
conda_heyoka_head_release_310:
docker:
- image: cimg/base:current
resource_class: large
steps:
- checkout
- run:
name: Build and test
command: bash ./tools/circleci_conda_heyoka_head_release_310.sh
- store_artifacts:
path: doc/_build/html
ubuntu_arm64:
machine:
image: ubuntu-2004:202101-01
Expand All @@ -60,5 +49,4 @@ workflows:
- conda_heyoka_head_39
- conda_heyoka_head_310
- conda_heyoka_head_312
- conda_heyoka_head_release_310
- ubuntu_arm64
13 changes: 8 additions & 5 deletions .github/workflows/gh_actions_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ jobs:
conda_asan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: bash tools/gha_conda_asan.sh
conda_static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: bash tools/gha_conda_static.sh
osx_heyoka_head:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: bash tools/gha_osx_heyoka_head.sh
osx_heyoka_head_static:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: bash tools/gha_osx_heyoka_head_static.sh
manylinux2014-py312:
Expand All @@ -41,6 +41,9 @@ jobs:
HEYOKA_PY_BUILD_TYPE: "Python312"
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
steps:
# NOTE: don't updated to checkout@v4 here because
# the action does not work properly due to missing
# symbols on the ancient manylinux images.
- uses: actions/checkout@v3
- name: Build
run: bash tools/gha_manylinux.sh
Expand Down Expand Up @@ -111,7 +114,7 @@ jobs:
windows_2022_heyoka_head:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- uses: conda-incubator/setup-miniconda@v2
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and upload docs

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build docs
run: bash tools/gha_conda_docs.sh
- name: Upload docs
uses: actions/upload-pages-artifact@v3
with:
path: './doc/_build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
7 changes: 5 additions & 2 deletions doc/breaking_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ Removed/changed functions
As a consequence of the removal of automatic simplifications, several functions have been removed
as they are now obsolete. These include:

- the ``fix()``, ``fix_nn()`` and ``unfix()`` functions,
- the ``normalise()`` function.
- the ``fix()``, ``fix_nn()`` and ``unfix()`` functions. These functions were used
to temporarily disable automatic simplifications, and thus they serve no purpose
any more;
- the ``normalise()`` function. This function was used to manually trigger the application
of automatic simplifications.

Additionally, the ``normalise = True`` flag in the :func:`subs()` function has also been removed.

Expand Down
95 changes: 0 additions & 95 deletions tools/circleci_conda_heyoka_head_release_310.sh

This file was deleted.

69 changes: 69 additions & 0 deletions tools/gha_conda_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/usr/bin/env bash

# Echo each command
set -x

# Exit on error.
set -e

# Core deps.
sudo apt-get install wget

# Install conda+deps.
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O miniforge.sh
export deps_dir=$HOME/local
export PATH="$HOME/miniforge/bin:$PATH"
bash miniforge.sh -b -p $HOME/miniforge
mamba create -y -p $deps_dir c-compiler cxx-compiler python=3.10 git pybind11 \
ninja numpy mpmath cmake llvmdev tbb-devel tbb astroquery libboost-devel \
'mppp=1.*' sleef fmt spdlog myst-nb matplotlib sympy scipy pykep cloudpickle \
'sphinx=7.*' 'sphinx-book-theme=1.*'
source activate $deps_dir

export HEYOKA_PY_PROJECT_DIR=`pwd`

# Checkout, build and install heyoka's HEAD.
git clone --depth 1 https://github.com/bluescarni/heyoka.git heyoka_cpp
cd heyoka_cpp
mkdir build
cd build

cmake -G Ninja ../ \
-DCMAKE_INSTALL_PREFIX=$deps_dir \
-DCMAKE_PREFIX_PATH=$deps_dir \
-DHEYOKA_WITH_MPPP=yes \
-DHEYOKA_WITH_SLEEF=yes \
-DBoost_NO_BOOST_CMAKE=ON

ninja -v install

cd ../../

mkdir build
cd build

cmake -G Ninja ../ \
-DCMAKE_INSTALL_PREFIX=$deps_dir \
-DCMAKE_PREFIX_PATH=$deps_dir \
-DHEYOKA_PY_ENABLE_IPO=yes \
-DBoost_NO_BOOST_CMAKE=ON

ninja -v install

cd ../tools

python ci_test_runner.py

cd $HEYOKA_PY_PROJECT_DIR

cd doc

# NOTE: run linkcheck only if we are on a pull request.
if [[ -n "${GITHUB_HEAD_REF}" ]]; then
make html linkcheck doctest
else
make html doctest
fi

set +e
set +x

0 comments on commit ee0d8df

Please sign in to comment.