Skip to content

docs: minor clarification on wait_complete() #336

docs: minor clarification on wait_complete()

docs: minor clarification on wait_complete() #336

Workflow file for this run

# vim: sw=2
name: Build CI
on:
push:
pull_request:
release:
types: [published]
check_suite:
types: [rerequested]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
rip-and-test:
runs-on: ubuntu-24.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: |
set -x
sudo apt-get install -y eatmydata
eatmydata ./scripts/travis-install-build-deps.sh
sudo eatmydata apt --quiet --yes upgrade
cd src
eatmydata ./autogen.sh
eatmydata ./configure --disable-check-runtime-deps
eatmydata make -O -j$((1+$(nproc))) default pycheck V=1
# Note that the package build covers html docs
eatmydata ../scripts/rip-environment runtests -p
rip-and-test-clang:
runs-on: ubuntu-24.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: Clang build RIP & test
run: |
set -x
sudo apt-get install -y eatmydata
eatmydata ./scripts/travis-install-build-deps.sh
sudo eatmydata apt-get install -y clang
sudo eatmydata apt --quiet --yes upgrade
cd src
eatmydata ./autogen.sh
CC=clang CXX=clang++ eatmydata ./configure --disable-check-runtime-deps
eatmydata make -O -j$((1+$(nproc))) default pycheck V=1
# Note that the package build covers html docs
eatmydata ../scripts/rip-environment runtests -p
htmldocs:
runs-on: ubuntu-24.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
sudo eatmydata apt --quiet --yes upgrade
cd src
eatmydata ./autogen.sh
eatmydata ./configure --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: ${{ matrix.runner }}
strategy:
matrix:
runner: ["ubuntu-24.04", "ubuntu-24.04-arm"]
image: ["debian:bookworm", "debian:trixie", "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
apt-get --yes --quiet install eatmydata curl
eatmydata apt --quiet --yes upgrade
# Install stuff needed to check out the linuxcnc repo and turn it into a debian source package.
eatmydata 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: |
case "${{matrix.image}}" in
debian:sid|debian:bookworm|debian:trixie)
exit 0
;;
*)
;;
esac
set -e
set -x
eatmydata apt-get --yes --quiet install --no-install-recommends gpg software-properties-common
eatmydata gpg --homedir="${PWD}/gnupg" --output /etc/apt/trusted.gpg.d/linuxcnc-deb-archive.gpg --export 3CB9FD148F374FEF
DIST=$(echo ${{matrix.image}} | cut -d : -f 2)
eatmydata add-apt-repository "deb http://linuxcnc.org $DIST base"
eatmydata apt-get --quiet update
- name: Build architecture-specific Debian packages
env:
DEBEMAIL: emc-developers@lists.sourceforge.net
DEBFULLNAME: LinuxCNC Github CI Robot
DEBIAN_FRONTEND: noninteractive
run: |
set -e
set -x
eatmydata git config --global --add safe.directory "${PWD}"
eatmydata debian/configure
eatmydata debian/update-dch-from-git
eatmydata scripts/get-version-from-git | sed -re 's/^v(.*)$/\1/' >| VERSION; cat VERSION
eatmydata git diff
eatmydata apt-get --yes --quiet build-dep --arch-only .
eatmydata debuild -us -uc --build=any
- name: Test debian packages
env:
DEBIAN_FRONTEND: noninteractive
run: |
set -e
set -x
eatmydata apt-get --yes --quiet install ../*.deb
eatmydata apt-get --yes --quiet install sudo # some tests run sudo...
eatmydata adduser --disabled-password --gecos "" testrunner
eatmydata passwd -d testrunner
eatmydata adduser testrunner sudo
chmod 0777 $(find tests/ -type d) # make test dirs world-writable for the testrunner
su -c "eatmydata ./scripts/runtests -p ./tests" testrunner
- name: Gather build artifacts
run: |
set -e
set -x
ARCH=$(dpkg --print-architecture)
DIST=$(echo ${{ matrix.image }} | cut -d : -f 2)
OUTDIR="artifacts/${DIST}/${ARCH}"
mkdir -p "$OUTDIR"
cp -v $(find .. -maxdepth 1 -type f | LC_ALL=C sort) "$OUTDIR" || true
(cd "$OUTDIR" && sha256sum * > SHA256SUMS.txt)
echo "DIST=$DIST" >> "$GITHUB_ENV"
echo "ARCH=$ARCH" >> "$GITHUB_ENV"
- name: Compute artifact metadata
id: meta
run: |
echo "dist=$(echo ${{ matrix.image }} | cut -d : -f 2)" >> $GITHUB_OUTPUT
echo "arch=$(dpkg --print-architecture)" >> $GITHUB_OUTPUT
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: linuxcnc-${{ steps.meta.outputs.dist }}-${{ steps.meta.outputs.arch }}
path: artifacts/${{ steps.meta.outputs.dist }}/${{ steps.meta.outputs.arch }}
if-no-files-found: error
package-indep:
runs-on: ubuntu-24.04
strategy:
matrix:
image: ["debian:bookworm", "debian:trixie", "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
apt-get --yes --quiet install eatmydata curl
eatmydata apt --quiet --yes upgrade
# Install stuff needed to check out the linuxcnc repo and turn it into a debian source package.
eatmydata 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: |
case "${{matrix.image}}" in
debian:sid|debian:bookworm|debian:trixie)
exit 0
;;
*)
;;
esac
set -e
set -x
eatmydata apt-get --yes --quiet install gpg software-properties-common
eatmydata gpg --homedir="${PWD}/gnupg" --output /etc/apt/trusted.gpg.d/linuxcnc-deb-archive.gpg --export 3CB9FD148F374FEF
DIST=$(echo ${{matrix.image}} | cut -d : -f 2)
eatmydata add-apt-repository "deb http://linuxcnc.org $DIST base"
eatmydata apt-get --quiet update
- name: Build architecture-independent Debian packages
env:
DEBEMAIL: emc-developers@lists.sourceforge.net
DEBFULLNAME: LinuxCNC Github CI Robot
DEBIAN_FRONTEND: noninteractive
run: |
set -e
set -x
eatmydata git config --global --add safe.directory "${PWD}"
eatmydata debian/configure
eatmydata debian/update-dch-from-git
eatmydata scripts/get-version-from-git | sed -re 's/^v(.*)$/\1/' >| VERSION; cat VERSION
eatmydata git diff
eatmydata apt-get --yes --quiet build-dep --indep-only .
eatmydata debuild -us -uc --build=source,all
- name: Test install debian packages
env:
DEBIAN_FRONTEND: noninteractive
run: |
set -e
set -x
eatmydata apt-get --yes --quiet install ../*.deb
- name: Gather build artifacts
run: |
set -e
set -x
DIST=$(echo ${{ matrix.image }} | cut -d : -f 2)
ARCH=all
OUTDIR="artifacts/${DIST}/${ARCH}"
mkdir -p "$OUTDIR"
cp -v $(find .. -maxdepth 1 -type f | LC_ALL=C sort) "$OUTDIR" || true
(cd "$OUTDIR" && sha256sum * > SHA256SUMS.txt)
echo "DIST=$DIST" >> "$GITHUB_ENV"
echo "ARCH=$ARCH" >> "$GITHUB_ENV"
- name: Compute artifact metadata
id: meta
run: |
echo "dist=$(echo ${{ matrix.image }} | cut -d : -f 2)" >> $GITHUB_OUTPUT
echo "arch=all" >> $GITHUB_OUTPUT
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: linuxcnc-${{ steps.meta.outputs.dist }}-${{ steps.meta.outputs.arch }}
path: artifacts/${{ steps.meta.outputs.dist }}/${{ steps.meta.outputs.arch }}
if-no-files-found: error
cppcheck:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Perform Source Code checks that were successful in the past
continue-on-error: true
run: |
set -x
git fetch --recurse-submodules=no https://github.com/linuxcnc/linuxcnc refs/tags/*:refs/tags/*
sudo apt-get -y install cppcheck shellcheck
scripts/cppcheck.sh
- name: Shellcheck
continue-on-error: true
run: |
scripts/shellcheck.sh
release:
name: Release packages
needs:
- package-arch
- package-indep
if: (github.event_name == 'release' && github.event.action == 'published') || startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
runs-on: ubuntu-24.04
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: release_artifacts
- name: Prepare upload assets
run: |
set -e
mkdir -p upload
echo "Downloaded artifacts layout:" && find release_artifacts -maxdepth 3 -print | sed 's/^/ /'
for d in release_artifacts/*; do
[ -d "$d" ] || continue
name=$(basename "$d")
# Expect name like linuxcnc-bookworm-amd64 or linuxcnc-trixie-all
dist=${name#linuxcnc-}
dist=${dist%-*}
arch=${name##*-}
echo "Processing artifact: $name (dist=$dist arch=$arch)"
# Copy built files into distro and arch specific directory
mkdir "upload/${dist}-${arch}/"
# sort file list for stable output
for f in $(find "$d" -maxdepth 1 -type f | LC_ALL=C sort); do
[ -f "$f" ] || continue
cp "$f" "upload/${dist}-${arch}"
done
echo "Preview of SHA256SUMS.txt:" && sed -n '1,200p' "upload/${dist}-${arch}/SHA256SUMS.txt" | sed 's/^/ /'
echo "Upload dir contents:" && ls -l "upload/${dist}-${arch}" | sed 's/^/ /'
done
- name: Create GitHub Release and upload assets
uses: softprops/action-gh-release@v2
with:
files: |
upload/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}