[CI]: Adopt custom CI image for junifer docs #374
3 changed files with 43 additions and 52 deletions
47
.github/workflows/docs-preview.yml
vendored
47
.github/workflows/docs-preview.yml
vendored
|
|
@ -18,7 +18,24 @@ concurrency: preview-${{ github.ref }}
|
||||||
jobs:
|
jobs:
|
||||||
build-docs:
|
build-docs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Use custom docs CI image
|
||||||
|
container: ghcr.io/juaml/junifer-docs:main
|
||||||
steps:
|
steps:
|
||||||
|
- name: Check ANTs
|
||||||
|
run: |
|
||||||
|
echo "Using ANTs : $(antsRegistration --version)"
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: |
|
||||||
|
# actions/checkout fails to identify Git as it's not in the CI image
|
||||||
|
apt-get -qq update && \
|
||||||
|
Currently I couldn't find a way to put it inside the image as the build kept failing. I wanted the same as well so it's usable, but I guess it'll take some trial and error to fix this mess that gh-action has. Here's that PR: https://github.com/juaml/junifer/pull/373 Currently I couldn't find a way to put it inside the image as the build kept failing. I wanted the same as well so it's usable, but I guess it'll take some trial and error to fix this mess that gh-action has. Here's that PR: https://github.com/juaml/junifer/pull/373
ok then, let's move forward. ok then, let's move forward.
|
|||||||
|
apt-get -qq install -y \
|
||||||
|
git \
|
||||||
|
git-annex \
|
||||||
|
make \
|
||||||
|
jq
|
||||||
|
# Copy xfms directory
|
||||||
|
mkdir -p $HOME/junifer/data/xfms && \
|
||||||
|
cp -ar /root/junifer/data/xfms/. $HOME/junifer/data/xfms/
|
||||||
- name: Checkout source
|
- name: Checkout source
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -28,36 +45,14 @@ jobs:
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
- name: Check for sudo
|
- name: Install Python dependencies
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
if type sudo >/dev/null 2>&1; then SUDO="sudo"; else SUDO=""; fi
|
|
||||||
echo "SUDO=$SUDO" >> $GITHUB_ENV
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
$SUDO bash -c "$(curl -fsSL http://neuro.debian.net/_files/neurodebian-travis.sh)"
|
|
||||||
$SUDO apt-get update -qq
|
|
||||||
$SUDO apt-get install git-annex-standalone
|
|
||||||
python -m pip install --upgrade pip setuptools wheel
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
python -m pip install -e ".[docs,neurokit2]"
|
python -m pip install -e ".[docs,neurokit2]"
|
||||||
- name: Configure git for datalad
|
- name: Configure Git for DataLad
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "runner@github.com"
|
git config --global user.email "junifer-runner@github.com"
|
||||||
git config --global user.name "GITHUB CI Runner"
|
git config --global user.name "GitHub Runner"
|
||||||
- name: Install ANTs
|
|
||||||
run: |
|
|
||||||
echo "++ Add universe repo"
|
|
||||||
sudo add-apt-repository -y universe
|
|
||||||
|
|
||||||
echo "++ Update package manager info"
|
|
||||||
sudo apt-get update -qq
|
|
||||||
|
|
||||||
echo "++ Downloading ANTs"
|
|
||||||
curl -fsSL -o ants.zip https://github.com/ANTsX/ANTs/releases/download/v2.5.1/ants-2.5.1-ubuntu-22.04-X64-gcc.zip
|
|
||||||
unzip ants.zip -d /opt
|
|
||||||
mv /opt/ants-2.5.1/bin/* /opt/ants-2.5.1
|
|
||||||
rm ants.zip
|
|
||||||
echo "/opt/ants-2.5.1" >> $GITHUB_PATH
|
|
||||||
- name: Test build docs
|
- name: Test build docs
|
||||||
run: |
|
run: |
|
||||||
BUILDDIR=_build/main make -C docs/ local
|
BUILDDIR=_build/main make -C docs/ local
|
||||||
|
|
|
||||||
47
.github/workflows/docs.yml
vendored
47
.github/workflows/docs.yml
vendored
|
|
@ -12,7 +12,24 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
build-docs:
|
build-docs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Use custom docs CI image
|
||||||
|
container: ghcr.io/juaml/junifer-docs:main
|
||||||
steps:
|
steps:
|
||||||
|
- name: Check ANTs
|
||||||
|
run: |
|
||||||
|
echo "Using ANTs : $(antsRegistration --version)"
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: |
|
||||||
|
# actions/checkout fails to identify Git as it's not in the CI image
|
||||||
|
apt-get -qq update && \
|
||||||
|
apt-get -qq install -y \
|
||||||
|
git \
|
||||||
|
git-annex \
|
||||||
|
make \
|
||||||
|
jq
|
||||||
|
# Copy xfms directory
|
||||||
|
mkdir -p $HOME/junifer/data/xfms && \
|
||||||
|
cp -ar /root/junifer/data/xfms/. $HOME/junifer/data/xfms/
|
||||||
- name: Checkout source
|
- name: Checkout source
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -23,37 +40,15 @@ jobs:
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
- name: Check for sudo
|
- name: Install Python dependencies
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
if type sudo >/dev/null 2>&1; then SUDO="sudo"; else SUDO=""; fi
|
|
||||||
echo "SUDO=$SUDO" >> $GITHUB_ENV
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
$SUDO bash -c "$(curl -fsSL http://neuro.debian.net/_files/neurodebian-travis.sh)"
|
|
||||||
$SUDO apt-get update -qq
|
|
||||||
$SUDO apt-get install git-annex-standalone
|
|
||||||
python -m pip install --upgrade pip setuptools wheel
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
python -m pip install -e ".[docs,neurokit2]"
|
python -m pip install -e ".[docs,neurokit2]"
|
||||||
python -m pip install git+https://github.com/dls-controls/sphinx-multiversion@only-arg
|
python -m pip install git+https://github.com/dls-controls/sphinx-multiversion@only-arg
|
||||||
- name: Configure git for datalad
|
- name: Configure Git for DataLad
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "runner@github.com"
|
git config --global user.email "junifer-runner@github.com"
|
||||||
git config --global user.name "GITHUB CI Runner"
|
git config --global user.name "GitHub Runner"
|
||||||
- name: Install ANTs
|
|
||||||
run: |
|
|
||||||
echo "++ Add universe repo"
|
|
||||||
sudo add-apt-repository -y universe
|
|
||||||
|
|
||||||
echo "++ Update package manager info"
|
|
||||||
sudo apt-get update -qq
|
|
||||||
|
|
||||||
echo "++ Downloading ANTs"
|
|
||||||
curl -fsSL -o ants.zip https://github.com/ANTsX/ANTs/releases/download/v2.5.1/ants-2.5.1-ubuntu-22.04-X64-gcc.zip
|
|
||||||
unzip ants.zip -d /opt
|
|
||||||
mv /opt/ants-2.5.1/bin/* /opt/ants-2.5.1
|
|
||||||
rm ants.zip
|
|
||||||
echo "/opt/ants-2.5.1" >> $GITHUB_PATH
|
|
||||||
- name: Checkout gh-pages
|
- name: Checkout gh-pages
|
||||||
# As we already did a deploy of gh-pages above, it is guaranteed to be there
|
# As we already did a deploy of gh-pages above, it is guaranteed to be there
|
||||||
# so check it out so we can selectively build docs below
|
# so check it out so we can selectively build docs below
|
||||||
|
|
|
||||||
1
docs/changes/newsfragments/374.misc
Normal file
1
docs/changes/newsfragments/374.misc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Adopt usage of custom docs CI image for building and previewing docs actions by `Synchon Mandal`_
|
||||||
Loading…
Reference in a new issue
Why can't we have this already in the image? Same as the "home dir" steps. Ideally, this image should be also usable externally.