Skip to content

Commit

Permalink
ci: Update GitHub Action CI
Browse files Browse the repository at this point in the history
This commit contains the following changes:
* Copies submodules recursively to provide all the files for the test
* Removes the F4PGA toolchain usage from the CI. Instead, it checks the
  flow described in the README using tuttest
* Removes the btdi containers and restores the flow that installs all
  the requirements explicitely

Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
  • Loading branch information
rw1nkler committed Oct 20, 2023
1 parent f73414d commit 8f2d32b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 48 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ghpages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: GH Pages

on:
pull_request:
push:
branches:
- main

jobs:
docs-generation:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y texlive-full
python3 -m pip install -r docs/requirements.txt
- name: Generate documentation
run: |
cd docs
make html latexpdf
cp build/latex/*.pdf build/html/
- uses: actions/upload-artifact@v3
with:
name: gh-page
path: docs/build/html

- name: Deploy to Github Pages
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
run: |
cd docs/build/html
touch .nojekyll
git init
cp ../../../.git/config ./.git/config
git add .
git config --local user.email "push@gha"
git config --local user.name "GHA"
git commit -am "update ${{ github.sha }}"
git push -u origin +HEAD:gh-pages
rm -rf .git
52 changes: 4 additions & 48 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true

- uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -75,7 +77,7 @@ jobs:
cd examples/hdmi
tuttest README.md generate | bash -
cd -
- name: Generate sources for example inout setup
if: matrix.example == 'INOUT'
run: |
Expand All @@ -87,57 +89,11 @@ jobs:
if: matrix.example == 'PWM'
run: |
cd examples/pwm
make generate copy_sources
tuttest README.md generate | bash -
cd -
docker run --rm -i -v $(pwd):/wrk -w /wrk \
gcr.io/hdl-containers/conda/f4pga/xc7/z010 \
bash -le <<'EOF'
pip3 install -r requirements.impl.txt
cd examples/pwm
make zvb
EOF
cp examples/pwm/build/project_1_0/zynq-symbiflow/project_top.bit top.bit
- uses: actions/upload-artifact@v3
if: matrix.example == 'PWM'
with:
name: top.bit
path: top.bit


Docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: docker://btdi/sphinx:min
with:
args: ./.github/scripts/sphinx.sh

- uses: docker://btdi/latex
with:
args: ./.github/scripts/latex.sh

- name: 'Upload artifact: Sphinx HTML and PDF'
uses: actions/upload-artifact@v3
with:
name: Documentation
path: docs/build/html

- name: Deploy to Github Pages
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
run: |
sudo chown -R $(whoami) docs
cd docs/build/html
touch .nojekyll
git init
cp ../../../.git/config ./.git/config
git add .
git config --local user.email "push@gha"
git config --local user.name "GHA"
git commit -am "update ${{ github.sha }}"
git push -u origin +HEAD:gh-pages
rm -rf .git

0 comments on commit 8f2d32b

Please sign in to comment.