Fix module 'locale' has no attribute 'format' #321
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] | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
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: | | |
set -x | |
sudo apt-get install -y eatmydata | |
eatmydata ./scripts/travis-install-build-deps.sh | |
eatmydata curl -O https://snapshot.debian.org/archive/debian/20220716T154603Z/pool/main/p/po4a/po4a_0.67-2_all.deb | |
sudo eatmydata apt install --yes ./po4a_0.67-2_all.deb | |
sudo eatmydata apt --quiet --yes upgrade | |
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 | |
eatmydata ../scripts/rip-environment runtests -p | |
rip-and-test-clang: | |
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: 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 | |
eatmydata curl -O https://snapshot.debian.org/archive/debian/20220716T154603Z/pool/main/p/po4a/po4a_0.67-2_all.deb | |
sudo eatmydata apt install --yes ./po4a_0.67-2_all.deb | |
sudo eatmydata apt --quiet --yes upgrade | |
cd src | |
eatmydata ./autogen.sh | |
CC=clang CXX=clang++ 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 | |
eatmydata ../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 eatmydata apt install --yes ./po4a_0.67-2_all.deb | |
sudo eatmydata apt --quiet --yes upgrade | |
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 | |
apt-get --yes --quiet install eatmydata curl | |
eatmydata curl -O https://snapshot.debian.org/archive/debian/20220716T154603Z/pool/main/p/po4a/po4a_0.67-2_all.deb | |
eatmydata apt install --yes ./po4a_0.67-2_all.deb | |
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) | |
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: [email protected] | |
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 | |
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 | |
apt-get --yes --quiet install eatmydata curl | |
eatmydata curl -O https://snapshot.debian.org/archive/debian/20220716T154603Z/pool/main/p/po4a/po4a_0.67-2_all.deb | |
eatmydata apt install --yes ./po4a_0.67-2_all.deb | |
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) | |
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: [email protected] | |
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=all | |
- name: Test install debian packages | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
set -e | |
set -x | |
eatmydata apt-get --yes --quiet install ../*.deb |