Skip to content

Commit

Permalink
CI updates (#152)
Browse files Browse the repository at this point in the history
* CI updates

* Remove if

* Publish only on master

* Updating requirements.txt

* Publish only on main
  • Loading branch information
kjvbrt authored Apr 25, 2024
1 parent 1902bb0 commit 97ae373
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: publish
name: Publish

on: [push]
on:
push:
branches:
- main

jobs:
sphinx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Requirements
Expand All @@ -16,13 +19,12 @@ jobs:
run: |
sphinx-multiversion . build
- name: Publish gh-pages
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: |
cd build
git init
git config user.name "Key4hep bot"
git config user.email "Key4hep[email protected]"
git remote add upstream https://vvolkl:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
git config user.name "FCCSW Bot"
git config user.email "fccsw[email protected]"
git remote add upstream https://kjvbrt:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
touch .nojekyll
git add .nojekyll
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: linux
name: Test

on: [push, pull_request]

Expand All @@ -8,21 +8,26 @@ jobs:
strategy:
fail-fast: false
matrix:
SETUP: ['/cvmfs/sw.hsf.org/key4hep/setup.sh', '/cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh']
STACK: ['/cvmfs/sw.hsf.org/key4hep/setup.sh',
'/cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh']
steps:
- uses: actions/checkout@v2
- uses: cvmfs-contrib/github-action-cvmfs@v2
- uses: actions/checkout@v4
- uses: cvmfs-contrib/github-action-cvmfs@v4
- name: Start container
run: |
docker run -it --name CI_container -v ${GITHUB_WORKSPACE}:/Package -v /cvmfs:/cvmfs:shared -d ghcr.io/aidasoft/centos7:latest /bin/bash
- name: RunTests
docker run -it \
--name CI_container \
-v ${GITHUB_WORKSPACE}:/Package \
-v /cvmfs:/cvmfs:shared \
-d ghcr.io/key4hep/key4hep-images/alma9:latest /bin/bash
- name: Run tests
run: |
docker exec CI_container /bin/bash -c \
'curl -LO https://github.com/jgm/pandoc/releases/download/2.18/pandoc-2.18-linux-amd64.tar.gz;\
tar -xzf pandoc-2.18-linux-amd64.tar.gz;\
cp pandoc-2.18/bin/pandoc /usr/local/bin/;\
cd ./Package;\
source ${{ matrix.SETUP }};\
source ${{ matrix.STACK }};\
mkdir build;\
cd build;\
cmake ..;\
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Sphinx==5.3.0
myst-parser==0.18.1
sphinx-rtd-theme==1.0.0
Sphinx==7.3.7
myst-parser==3.0.0
sphinx-rtd-theme==2.0.0
sphinx-togglebutton==0.3.2
sphinx-copybutton==0.5.0
sphinx-copybutton==0.5.2
sphinx-multiversion==0.2.4

0 comments on commit 97ae373

Please sign in to comment.