Skip to content

Commit

Permalink
Rework CI
Browse files Browse the repository at this point in the history
Remove environment-setup.sh script and delegate fetching dependencies to
yml.
  • Loading branch information
wkkuna committed Aug 2, 2023
1 parent fd6d51f commit 40b3af5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
27 changes: 16 additions & 11 deletions .ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
image: $DOCKER_IMAGE

test:
.build_setup: &setup_env
before_script:
- export DEBIAN_FRONTEND=noninteractive
# sudo is necessary for setup-enviroment.sh script
- apt --allow-releaseinfo-change update && apt install -y --no-install-recommends git build-essential sudo
- ./.github/scripts/setup-environment.sh
- export DEBIAN_FRONTEND=noninteractive
- apt --allow-releaseinfo-change update && apt install -y --no-install-recommends git build-essential make python3 python3-pip
- apt install -y --no-install-recommends apt-transport-https curl gnupg graphicsmagick-imagemagick-compat default-jdk default-jre
- echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee /etc/apt/sources.list.d/sbt.list
- echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list
- curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add
- apt update && apt install -y sbt
- git submodule update --init --recursive
- pip3 install -r docs/requirements.txt

build-and-test:
<<: *setup_env
stage: build
script:
- make testall
- mkdir out/
Expand All @@ -16,15 +24,12 @@ test:
- out/

build-docs:
<<: *setup_env
stage: build
script:
- export DEBIAN_FRONTEND=noninteractive
- apt --allow-releaseinfo-change update && apt install -y --no-install-recommends git build-essential sudo
- sudo apt install -y --no-install-recommends make python3 python3-pip
- pip3 install -r docs/requirements.txt
- SPHINXOPTS="-A conf_py_path=$DOCS_DIR/$SOURCEDIR/ -A commit=$CI_BUILD_REF -A branch=$CI_BUILD_REF_NAME" make html
- make linkcheck
- cp docs/*.png build/html
- cp docs/*.png build/html
- tar cf $CI_DOCS_ARCHIVE -C build/html/ .
artifacts:
paths:
Expand All @@ -37,7 +42,7 @@ deploy-docs:
dependencies:
- build-docs
stage: deploy
tags: ['docs']
tags: ["docs"]
script: echo 'Deploying docs'
artifacts:
paths:
Expand Down
6 changes: 0 additions & 6 deletions .github/scripts/setup-environment.sh

This file was deleted.

17 changes: 10 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,36 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test
- name: Build and test the design
run: |
./.github/scripts/setup-environment.sh
make testall
export DEBIAN_FRONTEND=noninteractive
sudo apt --allow-releaseinfo-change update && sudo apt install -y --no-install-recommends apt-transport-https curl gnupg graphicsmagick-imagemagick-compat default-jdk default-jre
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
sudo apt update && sudo apt install -y sbt
make testall
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup environment
- name: Setup documentation environment
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt update -qq
sudo apt install -y make python3 python3-pip
pip3 install -r docs/requirements.txt
- name: Build the documentation
run: |
SPHINXOPTS="-A conf_py_path=$DOCS_DIR/$SOURCEDIR/ -A commit=$CI_BUILD_REF -A branch=$CI_BUILD_REF_NAME" make html
make linkcheck
cp docs/*.png build/html
- name: 'Upload artifact: Sphinx HTML'
- name: "Upload artifact: Sphinx HTML"
uses: actions/upload-artifact@v3
with:
name: Documentation-HTML
Expand Down

0 comments on commit 40b3af5

Please sign in to comment.