activate highlight.js #11059
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: sw=2 | |
name: Build CI | |
on: | |
push: | |
pull_request: | |
release: | |
types: [published] | |
check_suite: | |
types: [rerequested] | |
jobs: | |
rip-and-test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- run: git fetch --recurse-submodules=no https://github.com/linuxcnc/linuxcnc refs/tags/*:refs/tags/* | |
- name: Build RIP & test | |
run: | | |
./scripts/travis-install-build-deps.sh | |
sudo apt-get install -y eatmydata | |
curl -O https://snapshot.debian.org/archive/debian/20220716T154603Z/pool/main/p/po4a/po4a_0.67-2_all.deb | |
sudo apt install ./po4a_0.67-2_all.deb | |
cd src | |
eatmydata ./autogen.sh | |
eatmydata ./configure --with-realtime=uspace --disable-check-runtime-deps | |
eatmydata make -O -j$((1+$(nproc))) default pycheck V=1 | |
# Note that the package build covers html docs | |
../scripts/rip-environment runtests -p | |
htmldocs: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- run: git fetch --recurse-submodules=no https://github.com/linuxcnc/linuxcnc refs/tags/*:refs/tags/* | |
- name: Build HTML docmentation | |
run: | | |
./scripts/travis-install-build-deps.sh | |
sudo apt-get install -y eatmydata | |
curl -O https://snapshot.debian.org/archive/debian/20220716T154603Z/pool/main/p/po4a/po4a_0.67-2_all.deb | |
sudo apt install ./po4a_0.67-2_all.deb | |
cd src | |
eatmydata ./autogen.sh | |
eatmydata ./configure --with-realtime=uspace --disable-check-runtime-deps --enable-build-documentation=html | |
eatmydata make -O -j$((1+$(nproc))) manpages | |
eatmydata make -O -j$((1+$(nproc))) translateddocs | |
eatmydata make -O -j$((1+$(nproc))) docs | |
# Note that the package build covers html docs | |
package-arch: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
image: ["debian:buster", "debian:bullseye", "debian:bookworm", "debian:sid"] | |
container: | |
image: ${{ matrix.image }} | |
# IPC_OWNER is needed for shmget IPC_CREAT | |
# SYS_ADMIN is needed for shmctl IPC_SET | |
options: --cpus=2 --cap-add=IPC_OWNER --cap-add=SYS_ADMIN | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Install pre-dependencies | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
set -e | |
set -x | |
apt-get --quiet update | |
# Install stuff needed to check out the linuxcnc repo and turn it into a debian source package. | |
apt-get --yes --quiet install --no-install-suggests git lsb-release python3 devscripts | |
- uses: actions/checkout@v3 | |
with: | |
# "fetch-depth: 0" fetches all of history, this is needed by | |
# our build system to determine the version from tags | |
fetch-depth: 0 | |
- name: Add linuxcnc.org deb archive | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
set -e | |
set -x | |
apt-get --yes --quiet install --no-install-recommends gpg software-properties-common | |
gpg --homedir="${PWD}/gnupg" --output /etc/apt/trusted.gpg.d/linuxcnc-deb-archive.gpg --export 3CB9FD148F374FEF | |
DIST=$(echo ${{matrix.image}} | cut -d : -f 2) | |
add-apt-repository "deb http://linuxcnc.org $DIST base" | |
apt-get --quiet update | |
- name: Build architecture-specific Debian packages | |
env: | |
DEBEMAIL: [email protected] | |
DEBFULLNAME: LinuxCNC Github CI Robot | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
set -e | |
set -x | |
git config --global --add safe.directory "${PWD}" | |
debian/configure | |
debian/update-dch-from-git | |
scripts/get-version-from-git | sed -re 's/^v(.*)$/\1/' >| VERSION; cat VERSION | |
git diff | |
apt-get --yes --quiet build-dep --arch-only . | |
apt-get --yes --quiet install eatmydata | |
eatmydata debuild -us -uc --build=any | |
- name: Test debian packages | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
set -e | |
set -x | |
apt-get --yes --quiet install ../*.deb | |
apt-get --yes --quiet install sudo # some tests run sudo... | |
adduser --disabled-password --gecos "" testrunner | |
passwd -d testrunner | |
adduser testrunner sudo | |
chmod 0777 $(find tests/ -type d) # make test dirs world-writable for the testrunner | |
su -c "./scripts/runtests -p ./tests" testrunner | |
- name: Stage debs for archiving | |
run: | | |
set -e | |
set -x | |
mkdir -p built-debs/$(lsb_release -cs) | |
cp ../linuxcnc*_* built-debs/$(lsb_release -cs) | |
- name: Archive generated Debian packages | |
uses: actions/upload-artifact@v3 | |
with: | |
name: debs | |
retention-days: 7 | |
path: built-debs/* | |
package-indep: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
image: ["debian:buster", "debian:bullseye", "debian:bookworm", "debian:sid"] | |
container: | |
image: ${{ matrix.image }} | |
# IPC_OWNER is needed for shmget IPC_CREAT | |
# SYS_ADMIN is needed for shmctl IPC_SET | |
options: --cpus=2 --cap-add=IPC_OWNER --cap-add=SYS_ADMIN | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Install pre-dependencies | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
set -e | |
set -x | |
apt-get --quiet update | |
# Install stuff needed to check out the linuxcnc repo and turn it into a debian source package. | |
apt-get --yes --quiet install --no-install-suggests git lsb-release python3 devscripts | |
- uses: actions/checkout@v3 | |
with: | |
# "fetch-depth: 0" fetches all of history, this is needed by | |
# our build system to determine the version from tags | |
fetch-depth: 0 | |
- name: Add linuxcnc.org deb archive | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
set -e | |
set -x | |
apt-get --yes --quiet install gpg software-properties-common | |
gpg --homedir="${PWD}/gnupg" --output /etc/apt/trusted.gpg.d/linuxcnc-deb-archive.gpg --export 3CB9FD148F374FEF | |
DIST=$(echo ${{matrix.image}} | cut -d : -f 2) | |
add-apt-repository "deb http://linuxcnc.org $DIST base" | |
apt-get --quiet update | |
- name: Build architecture-independent Debian packages | |
env: | |
DEBEMAIL: [email protected] | |
DEBFULLNAME: LinuxCNC Github CI Robot | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
set -e | |
set -x | |
git config --global --add safe.directory "${PWD}" | |
debian/configure | |
debian/update-dch-from-git | |
scripts/get-version-from-git | sed -re 's/^v(.*)$/\1/' >| VERSION; cat VERSION | |
git diff | |
apt-get --yes --quiet build-dep --indep-only . | |
apt-get --yes --quiet install eatmydata | |
eatmydata debuild -us -uc --build=all | |
- name: Test install debian packages | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
set -e | |
set -x | |
apt-get --yes --quiet install ../*.deb | |
- name: Stage debs for archiving | |
run: | | |
set -e | |
set -x | |
mkdir -p built-debs/$(lsb_release -cs) | |
cp ../linuxcnc*_* built-debs/$(lsb_release -cs) | |
- name: Archive generated PDF files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PDFs | |
retention-days: 7 | |
path: docs/*.pdf | |
- name: Archive generated Debian packages | |
uses: actions/upload-artifact@v3 | |
with: | |
name: debs | |
retention-days: 7 | |
path: built-debs/* |