Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI #20

Merged
merged 170 commits into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
20221d7
create template for github actions
MichaelStubbings Jul 2, 2021
d6ac03a
Add checkout actions for rootfs source and builder repositories
MichaelStubbings Jul 2, 2021
90c79d9
Use repository field to obtain rootfs instead of the ssh key
MichaelStubbings Jul 2, 2021
9509290
Add gcc arm toolchain download and extract commands
MichaelStubbings Jul 6, 2021
8648b17
remove -O flag from wget
MichaelStubbings Jul 6, 2021
ad59ed0
add install for wget
MichaelStubbings Jul 6, 2021
7bfa12d
Tidy wget commands
MichaelStubbings Jul 6, 2021
a1305ca
remove -z flag from wget commands
MichaelStubbings Jul 6, 2021
8d7d291
add new link address for arm GCC toolchain
MichaelStubbings Jul 6, 2021
f4509cf
Remove https:// from wget arguments
MichaelStubbings Jul 6, 2021
5745e68
Add wei/wget plugin
MichaelStubbings Jul 6, 2021
0ebd5d7
Update make-zips.yml
MichaelStubbings Jul 6, 2021
87b4995
Replace the nameserver used on the VM by Google public DNS service
MichaelStubbings Jul 6, 2021
f4d8044
Add sudo to nameserver change
MichaelStubbings Jul 6, 2021
3f44c66
Remove namespace change and manual wget commands
MichaelStubbings Jul 6, 2021
09c6e71
Add paths to all dependancy steps
MichaelStubbings Jul 6, 2021
5293563
Remove path from gcc-arm toolchain
MichaelStubbings Jul 6, 2021
11b2f9b
Remove the arm-gcc zip file after extract
MichaelStubbings Jul 6, 2021
f96c44d
add method of extracting source files from pandABlocks-rootfs releases
MichaelStubbings Jul 6, 2021
5c081c2
merge deviation between local and remote branches
MichaelStubbings Jul 6, 2021
98748a5
separate run commands from uses due to actions incompatibility
MichaelStubbings Jul 6, 2021
6ee0440
treat deps.zip as a zip not a tar.xz
MichaelStubbings Jul 6, 2021
1289c56
update tar-files directory location
MichaelStubbings Jul 6, 2021
7198cb5
update navigation to tar-files directory
MichaelStubbings Jul 6, 2021
b9a5ab1
download tarfiles to tar-files directory
MichaelStubbings Jul 6, 2021
a13aa24
update extract tar files to navigate to tar-files directory
MichaelStubbings Jul 6, 2021
a9c4e32
update extraction of tar files
MichaelStubbings Jul 6, 2021
17914dd
add installer for system dependancies
MichaelStubbings Jul 7, 2021
626b730
add more system dependancies
MichaelStubbings Jul 7, 2021
bfff650
change apt to apt-get in system dependancies
MichaelStubbings Jul 7, 2021
b12f66b
update system dependancies for ubuntu
MichaelStubbings Jul 7, 2021
91fdfc4
strip incompatible system dependancies
MichaelStubbings Jul 7, 2021
b92b208
Setup bash script for generating CONFIG files
MichaelStubbings Jul 7, 2021
7270e95
remove / from config generation script
MichaelStubbings Jul 7, 2021
3b656fb
temporarily remove CONFIG generation code
MichaelStubbings Jul 7, 2021
987c4fc
adjust file location of Install system dependancies section
MichaelStubbings Jul 7, 2021
b818efe
remove duplicate run action
MichaelStubbings Jul 7, 2021
a4dadb7
add admin rights to bash script execution runner
MichaelStubbings Jul 7, 2021
f667f45
adjust how the bash script is ran
MichaelStubbings Jul 7, 2021
f14c7c6
adjust path of bash command
MichaelStubbings Jul 7, 2021
a766bfe
Update shell script with new paths and file creation methods
MichaelStubbings Jul 7, 2021
d8fb7c9
Add make zips step
MichaelStubbings Jul 7, 2021
61c987c
add check in build directory
MichaelStubbings Jul 7, 2021
dd5442e
Add upload artifact step
MichaelStubbings Jul 9, 2021
cea5122
Add curl command to test against wget
MichaelStubbings Jul 9, 2021
85da06a
Replace wget commands for curl commands
MichaelStubbings Jul 9, 2021
e0283d6
Merge branch 'ci-build' of github.com:PandABlocks/PandABlocks-rootfs …
MichaelStubbings Jul 9, 2021
3266453
Tidy comments
MichaelStubbings Jul 9, 2021
12e596b
add shell script to obtain each tar file independantly
MichaelStubbings Jul 12, 2021
89f13f3
Reformat tar-files to remove whitespaces
MichaelStubbings Jul 12, 2021
22361eb
reformat tar-files indentation
MichaelStubbings Jul 12, 2021
fffa3e2
add \ to end of each tar file in tar-files.sh
MichaelStubbings Jul 12, 2021
2e5fb02
Add new link for mtd-utils
MichaelStubbings Jul 12, 2021
61ed038
comment out last tar file
MichaelStubbings Jul 12, 2021
4ed3a34
remove \ from tar-file list
MichaelStubbings Jul 12, 2021
4ca4952
uncomment builder steps
MichaelStubbings Jul 12, 2021
aa3ed49
comment the comment that I uncommented
MichaelStubbings Jul 12, 2021
e666868
Comment the other comment that I uncommented
MichaelStubbings Jul 12, 2021
394e86a
add uboot and linux kernel sources to tar files
MichaelStubbings Jul 12, 2021
da80c0b
update links for uboot and linux tar files
MichaelStubbings Jul 12, 2021
74d747c
Add new link for m4 tar file
MichaelStubbings Jul 12, 2021
d9d50ec
Add custom checksum for m4 dependancy
MichaelStubbings Jul 13, 2021
dacd03e
Update m4 to v1.4.19
MichaelStubbings Jul 13, 2021
bae3bc9
update m4 checksum
MichaelStubbings Jul 13, 2021
09e55c5
Update link to autoconf-2.69
MichaelStubbings Jul 13, 2021
13a4a2a
Update download link of automake 1.15
MichaelStubbings Jul 13, 2021
0154868
update pkg-config download link
MichaelStubbings Jul 13, 2021
52d4ed2
add download name for busybox tar dependancy
MichaelStubbings Jul 13, 2021
b82853f
update busybox download link
MichaelStubbings Jul 13, 2021
1a4f39a
Update e2fsprogs download link
MichaelStubbings Jul 13, 2021
5526663
update e2fsprogs download location
MichaelStubbings Jul 13, 2021
fa022e5
add -L to e2fsprogs curl command
MichaelStubbings Jul 13, 2021
252f0c2
updated zlib download link
MichaelStubbings Jul 13, 2021
917952f
update link to busybox 1.33.1
MichaelStubbings Jul 14, 2021
0155e7f
remove duplicate curl command
MichaelStubbings Jul 14, 2021
636bc51
update ncurses download link
MichaelStubbings Jul 14, 2021
0f45ec7
add directory test before running make
MichaelStubbings Jul 14, 2021
b828124
update libffi download link
MichaelStubbings Jul 14, 2021
742914d
update readline download link
MichaelStubbings Jul 14, 2021
649c9db
Update download link for nano
MichaelStubbings Jul 14, 2021
ab4305f
remove duplicate -OL in curl command
MichaelStubbings Jul 14, 2021
6c022b2
updated link to procserv2.6.0
MichaelStubbings Jul 14, 2021
c31370f
Update ethtool-2.6.36.tar.gz
MichaelStubbings Jul 14, 2021
2f003fc
add new link for ethtool
MichaelStubbings Jul 14, 2021
d417e05
Update I2C tools download link
MichaelStubbings Jul 15, 2021
fef8ed5
add alternative ncurses link due to connection to server error
MichaelStubbings Jul 15, 2021
69f7a27
update I2C download link
MichaelStubbings Jul 15, 2021
fccba31
update libressl link
MichaelStubbings Jul 15, 2021
00ede01
update python download link
MichaelStubbings Jul 15, 2021
ea82d79
Add build matrix for x32/x64 bit architectures
MichaelStubbings Jul 15, 2021
2dff495
Make build matrix platform variables strings
MichaelStubbings Jul 15, 2021
3682fb5
add end of if statment 'fi' to bash scripts
MichaelStubbings Jul 15, 2021
90da849
update syntax of if statements
MichaelStubbings Jul 15, 2021
4e31c17
Update boot and deps zip file names
MichaelStubbings Jul 16, 2021
ffffe1e
update boot/deps names in makefile
MichaelStubbings Jul 16, 2021
8596e79
Update naming of output files
MichaelStubbings Jul 19, 2021
c392868
update output files name generation
MichaelStubbings Jul 19, 2021
2ca2846
Add command name into variable before assigning to output files
MichaelStubbings Jul 19, 2021
db138f1
add marks to custom output filenames in Makefile
MichaelStubbings Jul 19, 2021
d30a5cf
Add old naming solution back to output files
MichaelStubbings Jul 20, 2021
03fbc55
add file check to docs.yml
MichaelStubbings Jul 20, 2021
0e0ee51
Hard code zynq architecture for docs
MichaelStubbings Jul 20, 2021
db35df7
Fix compatibility errors in conf.py (due to the change from python2 t…
MichaelStubbings Jul 20, 2021
97c2390
update conf.py
MichaelStubbings Jul 20, 2021
ee629f4
Convert release in conf.py to string
MichaelStubbings Jul 20, 2021
18929b2
Add python 3.7 installation to docs.yml
MichaelStubbings Jul 20, 2021
dd46228
Add pip list command to docs.py
MichaelStubbings Jul 20, 2021
a5206ea
downgrade docutils to v0.16 to resolve compatibility issues
MichaelStubbings Jul 20, 2021
4a0eb25
Simplify system dependency lists
MichaelStubbings Jul 20, 2021
43c6c44
Uncomment boilerplate publisher for docs CI's
MichaelStubbings Jul 20, 2021
4434c21
update pathing of boilerplate release code
MichaelStubbings Jul 20, 2021
49f04d4
Add ls command to build directory after build
MichaelStubbings Jul 20, 2021
2d6c824
Update path of build file verification step
MichaelStubbings Jul 20, 2021
374200e
Update paths of publish steps
MichaelStubbings Jul 20, 2021
8a988cb
Update paths in docs.yml
MichaelStubbings Jul 20, 2021
393ef14
Simplify pathing across CI yaml files
MichaelStubbings Jul 20, 2021
5383e33
remove irrelevant file
MichaelStubbings Jul 21, 2021
a8439e4
Add simplified name to output build files
MichaelStubbings Jul 22, 2021
a9f2617
Add changelog.rst file
MichaelStubbings Jul 22, 2021
5a8b0e2
revert build files naming solution
MichaelStubbings Jul 22, 2021
edc4fa6
Revert m4 to 1.4.18
MichaelStubbings Jul 23, 2021
320e0d1
Update m4 to 1.4.19
MichaelStubbings Jul 23, 2021
687a520
Add link for m4 1.4.19
MichaelStubbings Jul 23, 2021
ae46e82
update pathing in tar files to be more generic
MichaelStubbings Jul 27, 2021
779bebc
Update pathing to all bash scripts to be more generic
MichaelStubbings Jul 27, 2021
d9eec32
Update path of PandABlocks-rootfs repo to match that specified in CONFIG
MichaelStubbings Jul 27, 2021
e5e05c1
Update tar-file download link for e2fsprogs
MichaelStubbings Jul 28, 2021
7d09d3d
Add correct pathing to release notes on release action
MichaelStubbings Jul 29, 2021
797a1dd
Updated pathing to be more generic
MichaelStubbings Aug 4, 2021
1c89dbb
Add brackets to environment variables
MichaelStubbings Aug 4, 2021
3e009df
Remove shell parameter from run commands
MichaelStubbings Aug 5, 2021
2cd486d
Remove .tostring() in conf.py and replace with text=True
MichaelStubbings Aug 5, 2021
4c2f8f2
Add latest build to changelog
MichaelStubbings Aug 5, 2021
880e0f8
Revert m4 to 1.4.18 to capture error
MichaelStubbings Aug 5, 2021
920e64c
remove alteration of m4 md5sum
MichaelStubbings Aug 5, 2021
70e99c0
Add flags to tar-files script to control what is downloaded
MichaelStubbings Aug 5, 2021
9bce060
Replace flags with generic argument in tar-files script
MichaelStubbings Aug 5, 2021
ac28f47
remove semi colon from tar file script
MichaelStubbings Aug 5, 2021
70bc693
Remove tar-file test directory
MichaelStubbings Aug 5, 2021
17f7f94
Fix unrecognizable fault in tar-file script
MichaelStubbings Aug 5, 2021
a682537
Update tests to follow updated directory names
MichaelStubbings Aug 5, 2021
90e999b
Remove manual update of m4 (1.4.19) due to rootfs pull-request merge
MichaelStubbings Aug 6, 2021
210ebca
Remove rogue hash
MichaelStubbings Aug 6, 2021
61286fc
Update automake to 1.15.1
MichaelStubbings Aug 6, 2021
4aaeb5a
Clean up comments
MichaelStubbings Aug 6, 2021
4948781
Add newline to toolchain and docs
MichaelStubbings Aug 6, 2021
80273aa
Add executable rights to the bash scripts
MichaelStubbings Aug 16, 2021
caf5e65
Add Xilinx device tree tar file dependency
MichaelStubbings Aug 18, 2021
7d6f3db
Add '\' to multiline curl statement
MichaelStubbings Aug 18, 2021
516fa11
Remove device tree dependency
MichaelStubbings Aug 18, 2021
0d5a00e
Join if-then statements into one line
MichaelStubbings Aug 19, 2021
816fb75
Add directory debugging job
MichaelStubbings Aug 19, 2021
43f1b87
Check contents of config files
MichaelStubbings Aug 19, 2021
6a428a4
Add brackets to platfrom variable
MichaelStubbings Aug 19, 2021
171737a
Remove literal from CONFIG file
MichaelStubbings Aug 19, 2021
ab39212
Split pbrootfs and rootfs config generation scripts
MichaelStubbings Aug 19, 2021
a11f0da
Update current release step to a single release job
MichaelStubbings Aug 23, 2021
ecb199d
Update cat command in CONFIG generation script
MichaelStubbings Aug 23, 2021
b4e3577
Move toolchain config parameter to non literal cat command
MichaelStubbings Aug 23, 2021
37c7174
Update config file script
MichaelStubbings Aug 23, 2021
6c0b4e9
uncomment directory tests
MichaelStubbings Aug 23, 2021
4c66cd9
Update link of e2fsprogs
MichaelStubbings Aug 23, 2021
0922f28
comment out debug steps
MichaelStubbings Aug 23, 2021
9933e84
Fully comment out directory list step
MichaelStubbings Aug 23, 2021
8f46d75
Change format of build files to <component>@<platform>-<version>
MichaelStubbings Aug 24, 2021
fdf8eb2
Rename make-zips.yml to code.yml
MichaelStubbings Sep 8, 2021
141afed
Add else condition to platform argument
MichaelStubbings Sep 13, 2021
d5dc8b6
Restore deps and boot zip names
MichaelStubbings Sep 13, 2021
297629e
Updated indentation in tar-files script
MichaelStubbings Sep 13, 2021
9be0067
Update indentation in tar-files script from 5 to 4
MichaelStubbings Sep 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/scripts/GNU-toolchain.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# Installs and extracts a GNU toolchain based on the systems architecture

PLATFORM=$1

# ARM GNU Toolchain
# Determine which toolchain to use
if [ "$PLATFORM" == "zynq" ]; then
TOOLCHAIN=https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz
elif [ "$PLATFORM" == "zynqmp" ]; then
TOOLCHAIN=https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz
else >&2 echo "Error: Argument $PLATFORM must be either zynq or zynqmp"
exit 1
fi

# Download and extract toolchain
curl -o toolchain.tar.xz -L $TOOLCHAIN
tar -xf toolchain.tar.xz
rm toolchain.tar.xz
34 changes: 34 additions & 0 deletions .github/scripts/config-file-pbrootfs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# Generates and populates CONFIG file for PandABlocks-rootfs repo.

PLATFORM=$1

# Determine the toolchain to use
if [ "$PLATFORM" == "zynq" ]; then
TOOLCHAIN=gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf
elif [ "$PLATFORM" == "zynqmp" ]; then
TOOLCHAIN=gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu
else >&2 echo "Error: Argument $PLATFORM must be either zynq or zynqmp"
exit 1
fi

cat >> PandABlocks-rootfs/CONFIG << 'EOL'
# Location of rootfs builder
ROOTFS_TOP = $(GITHUB_WORKSPACE)/rootfs

# Where to find source files
TAR_FILES = $(GITHUB_WORKSPACE)/tar-files

# Target location for build
PANDA_ROOT = $(GITHUB_WORKSPACE)/build

EOL

cat >> PandABlocks-rootfs/CONFIG << EOL
# Toolchain used to build the target
TOOLCHAIN_ROOT = \$(GITHUB_WORKSPACE)/$TOOLCHAIN

# Whether the platform is zynq or zyqnmp
PLATFORM = $PLATFORM

EOL
12 changes: 12 additions & 0 deletions .github/scripts/config-file-rootfs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# Generates and populates CONFIG file for rootfs repo.

cat >> rootfs/CONFIG.local << 'EOL'
TARGET = minimal

# This is the location where source and build files will be placed.
ROOTFS_ROOT = $(GITHUB_WORKSPACE)/build

# This is where all of the source tar files will be found.
TAR_DIRS = $(GITHUB_WORKSPACE)/tar-files
EOL
43 changes: 43 additions & 0 deletions .github/scripts/tar-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash
# Installs all sources relevant to the rootfs build as tar files

# Create the tar-files directory
mkdir tar-files
cd tar-files

# If no argument is given
if [[ -z $1 ]]; then
# Install tar file dependencies
curl -OL https://github.com/libffi/libffi/releases/download/v3.3-rc2/libffi-3.3-rc2.tar.gz \
-OL https://ftp.gnu.org/gnu/nano/nano-2.4.1.tar.gz \
-o cothread-2-18.tar.gz -L https://github.com/dls-controls/cothread/archive/refs/tags/2-18.tar.gz \
-OL https://zlib.net/fossils/zlib-1.2.8.tar.gz \
-o ethtool-2.6.36.tar.gz -L https://sourceforge.net/projects/gkernel/files/ethtool/2.6.36/ethtool-2.6.36.tar.gz/download \
-OL https://infraroot.at/pub/mtd/mtd-utils-2.1.2.tar.bz2 \
-OL https://busybox.net/downloads/busybox-1.23.2.tar.bz2 \
-OL https://github.com/ralphlange/procServ/releases/download/V2.6.1-rc1/procServ-2.6.1-rc1.tar.gz \
-o procServ-2.6.0.tar.gz -L https://sourceforge.net/projects/procserv/files/2.6.0/procServ-2.6.0.tar.gz/download \
-OL https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz \
-o e2fsprogs-1.46.2.tar.gz -L https://sourceforge.net/projects/e2fsprogs/files/e2fsprogs/v1.46.2/e2fsprogs-1.46.2.tar.gz/download \
-OL https://github.com/numpy/numpy/releases/download/v1.17.5/numpy-1.17.5.tar.gz \
-OL http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p15.tar.gz \
-OL https://matt.ucc.asn.au/dropbear/releases/dropbear-2015.67.tar.bz2 \
-OL https://ftp.gnu.org/gnu/readline/readline-6.3.tar.gz \
-OL https://busybox.net/downloads/busybox-1.33.1.tar.bz2 \
-o tornado-6.0.3.tar.gz -L https://github.com/tornadoweb/tornado/archive/refs/tags/v6.0.3.tar.gz \
-OL https://ftp.gnu.org/gnu/automake/automake-1.15.1.tar.gz \
-OL https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz \
-OL https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.0.2.tar.gz \
-OL https://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.gz \
-OL https://files.pythonhosted.org/packages/11/0a/7f13ef5cd932a107cd4c0f3ebc9d831d9b78e1a0e8c98a098ca17b1d7d97/setuptools-41.6.0.zip \
-OL http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-3.1.1.tar.bz2 \
-OL https://ftp.gnu.org/gnu/screen/screen-4.2.1.tar.gz \
-OL https://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz \
-OL https://ftp.gnu.org/gnu/ncurses/ncurses-6.1.tar.gz \
-OL https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz

fi

# Install linux tar file dependencies
curl -o u-boot-xlnx-xilinx-v2020.2.2-k26.tar.gz -L https://github.com/Xilinx/u-boot-xlnx/archive/refs/tags/xilinx-v2020.2.2-k26.tar.gz \
-o linux-xlnx-xilinx-v2020.2.2-k26.tar.gz -L https://github.com/Xilinx/linux-xlnx/archive/refs/tags/xilinx-v2020.2.2-k26.tar.gz
104 changes: 104 additions & 0 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Code CI

on:
push:
pull_request:

jobs:
build:
strategy:
matrix:
platform: ["zynq", "zynqmp"]

runs-on: ubuntu-latest
steps:

# Git repositories
- name: Checkout Source
uses: actions/checkout@v2
with:
path: PandABlocks-rootfs
# require history to get back to last tag for version number of branches
fetch-depth: 0

- name: Checkout rootfs builder
uses: actions/checkout@v2
with:
repository: dls-controls/rootfs
path: rootfs

# ARM GNU Toolchain
- name: Download Arm GNU toolchain - ${{ matrix.platform }}
run: bash PandABlocks-rootfs/.github/scripts/GNU-toolchain.sh ${{ matrix.platform }}

# Tar dependancies
- name: Download tar file dependencies
run: bash PandABlocks-rootfs/.github/scripts/tar-files.sh

# System dependencies
- name: Install system dependencies
run: |
sudo apt-get install -y libncurses5-dev expat
sudo pip install rst2pdf

#CONFIG files
- name: Generate CONFIG files - ${{ matrix.platform }}
run: |
bash PandABlocks-rootfs/.github/scripts/config-file-pbrootfs.sh ${{ matrix.platform }}
bash PandABlocks-rootfs/.github/scripts/config-file-rootfs.sh

# Verification of files/file structure
#- name: List workspace files
# run: |
# ls ${{ github.workspace }}
# echo " "
# ls PandABlocks-rootfs
# echo " "
# ls rootfs
# echo " "
# ls tar-files
# echo " "
# cat PandABlocks-rootfs/CONFIG
# echo " "
# cat rootfs/CONFIG.local

# Build
- name: Make zips
run: |
cd PandABlocks-rootfs
make zips

# Verification of build files
#- name: List build files
# run: ls build

# Artifacts
- name: Upload deps and boot build files
uses: actions/upload-artifact@v2
with:
name: deps&boot-${{ matrix.platform }}
path: |
build/deps*.zip
build/boot*.zip


release:
needs: [build]
runs-on: ubuntu-latest
# make a release on every tag
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v2
with:
name: deps&boot*
path: artifacts

- name: Github Release
# We pin to the SHA, not the tag, for security reasons.
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
uses: softprops/action-gh-release@2d72d869af3bf23602f9593a1e3fd739b80ac1eb # v0.1.12
with:
files: artifacts/*
body: See [Changelog](CHANGELOG.rst) for more details
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58 changes: 58 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Docs CI

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
# Git repositories
- name: Checkout Source
uses: actions/checkout@v2
with:
path: PandABlocks-rootfs
# require history to get back to last tag for version number of branches
fetch-depth: 0

# System dependencies (required for build)
- name: Install system dependencies
run: |
sudo pip install rst2pdf sphinx sphinx-rtd-theme --upgrade docutils==0.16

# CONFIG files
- name: Generate CONFIG files - zynq
run: |
sudo bash PandABlocks-rootfs/.github/scripts/config-file-pbrootfs.sh zynq

# Build
- name: Build Docs
run: |
cd PandABlocks-rootfs
make docs

- uses: rishabhgupta/split-by@v1
id: split
with:
string: ${{ github.ref }}
split-by: /

# Publish docs
- name: Move to versioned directory
# e.g. master or 0.1.2
run: |
mkdir PandABlocks-rootfs/.github/pages
mv build/build/html "PandABlocks-rootfs/.github/pages/${{ steps.split.outputs._2 }}"

- name: Publish Docs to gh-pages
# Only master and tags are published
if: "${{ github.repository_owner == 'dls-controls' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')) }}"
# We pin to the SHA, not the tag, for security reasons.
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: PandABlocks-rootfs/.github/pages
keep_files: true
16 changes: 16 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Changelog
=========

All notable changes to this project will be documented in this file.

The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_,
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.


2.1_ - 2021-04-27
-----------------

- Start keeping a changelog


.. _2.1: https://github.com/PandABlocks/PandABlocks-rootfs/releases/tag/2.1
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
try:
# Something like 1.5.0-3-g3ab26eb
release = subprocess.check_output([
"git", "describe", "--abbrev=7", "--dirty","--always", "--tags"])
"git", "describe", "--abbrev=7", "--dirty","--always", "--tags"], text=True)
except:
# No git, or not under a git repo
release = "0.0"

# The short X.Y version.
# The short X.Y version
version = ".".join(release.split(".")[:2])

# The language for content autogenerated by Sphinx. Refer to documentation
Expand Down Expand Up @@ -127,7 +127,7 @@
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except ImportError:
# If theme not found, still go ahead with build.
print 'sphinx_rtd_theme not found, using default'
print('sphinx_rtd_theme not found, using default')

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down