Update requirements for numpy 2 #596
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
# Based on https://github.com/executablebooks/github-action-demo | |
name: build | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
tags: | |
- '*' | |
# This job installs dependencies, build the book, and pushes it to `gh-pages` | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Install dependencies | |
- name: Install Graphviz | |
run: | | |
sudo apt-get install graphviz {lib,}graphviz-dev | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
- name: Install python dependencies | |
run: | | |
pip install --upgrade pip wheel | |
pip install -r requirements-CI.txt | |
- name: Install R support | |
run: | | |
# We need to remove R to pull in a version that's compatible with CRAN, weirdly. | |
sudo apt-get update | |
sudo apt-get remove r-base-core | |
sudo apt-get install r-cran-reticulate r-cran-pbdzmq r-cran-uuid r-cran-ape | |
sudo R -e 'install.packages("IRkernel")' | |
R -e 'IRkernel::installspec()' | |
# Build the book | |
- name: Build the book | |
run: ./build.sh | |
- name: Copy files for users to run tutorials | |
run: | | |
cp ./requirements.txt ./_build/html/. | |
cp -r data ./_build/html/examples | |
ls data > ./_build/html/examples/files.txt | |
# Push the book's HTML to github-pages | |
- name: GitHub Pages action | |
if: github.ref == 'refs/heads/main' | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./_build/html | |
- name: Trigger docs site rebuild | |
if: github.ref == 'refs/heads/main' | |
run: | | |
curl -X POST https://api.github.com/repos/tskit-dev/tskit-site/dispatches \ | |
-H 'Accept: application/vnd.github.everest-preview+json' \ | |
-u AdminBot-tskit:${{ secrets.ADMINBOT_TOKEN }} \ | |
--data '{"event_type":"build-docs"}' |