Skip to content

Commit 5d20ccb

Browse files
authored
Merge pull request #2452 from LinuxCNC/2.8-github-ci
2.8 Github CI
2 parents 27c9b2e + faf0576 commit 5d20ccb

5 files changed

Lines changed: 60 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,63 @@ on:
1010

1111
jobs:
1212
main:
13-
runs-on: ubuntu-18.04
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
shell: bash
17+
strategy:
18+
matrix:
19+
image: ["debian:wheezy", "debian:buster"]
20+
container:
21+
image: debian:buster
22+
# IPC_OWNER is needed for shmget IPC_CREAT
23+
# SYS_ADMIN is needed for shmctl IPC_SET
24+
options: --cpus=2 --cap-add=IPC_OWNER --cap-add=SYS_ADMIN
1425
steps:
1526
- name: Dump GitHub context
1627
env:
1728
GITHUB_CONTEXT: ${{ toJson(github) }}
1829
run: echo "$GITHUB_CONTEXT"
19-
- uses: actions/checkout@v2
30+
31+
- name: Install pre-dependencies
32+
env:
33+
DEBIAN_FRONTEND: noninteractive
34+
run: |
35+
set -e
36+
set -x
37+
apt-get --quiet update
38+
apt-get --yes --quiet install --no-install-suggests git
39+
40+
- uses: actions/checkout@v3
2041
with:
21-
submodules: true
42+
# "fetch-depth: 0" fetches all of history, this is needed by
43+
# our build system to determine the version from tags
2244
fetch-depth: 0
23-
- run: git fetch --recurse-submodules=no https://github.com/linuxcnc/linuxcnc refs/tags/*:refs/tags/*
24-
- run: ./scripts/travis-install-build-deps.sh
25-
- run: ./scripts/travis-build-test.sh
45+
46+
- run: apt-get update --quiet
47+
- run: apt-get --yes --quiet install --no-install-recommends gpg software-properties-common
48+
- run: gpg --homedir="${PWD}/gnupg" --output /etc/apt/trusted.gpg.d/linuxcnc-deb-archive.gpg --export 3CB9FD148F374FEF
49+
- run: |
50+
source /etc/os-release
51+
add-apt-repository "deb http://linuxcnc.org ${VERSION_CODENAME} base"
52+
- run: apt-get update --quiet
53+
54+
- run: apt-get install --quiet --yes --no-install-recommends python lsb-release devscripts equivs sudo # git
55+
56+
- run: adduser --disabled-password --gecos "" testrunner
57+
- run: passwd -d testrunner
58+
- run: adduser testrunner sudo
59+
60+
- run: chown -R testrunner:testrunner .
61+
62+
- run: sudo -u testrunner debian/configure uspace noauto
63+
- run: mk-build-deps -i -r -t 'apt-get --quiet --yes --no-install-recommends --no-install-suggests'
64+
- run: |
65+
set -e
66+
cd src
67+
sudo -u testrunner ./autogen.sh
68+
sudo -u testrunner ./configure --with-realtime=uspace --disable-check-runtime-deps --enable-build-documentation
69+
sudo -u testrunner make -j$(getconf _NPROCESSORS_ONLN)
70+
71+
- run: |
72+
sudo -u testrunner ./scripts/runtests

gnupg/pubring.gpg

1.86 KB
Binary file not shown.

gnupg/trustdb.gpg

0 Bytes
Binary file not shown.

tests/halcompile/personalities_mod/test.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ halcompile --personalities=2 --install $DIR/bitslice.comp
88

99
# This tells us the expected filename extension ${MODULE_EXT} of realtime
1010
# modules.
11-
source "${EMC2_HOME}/scripts/rtapi.conf"
11+
if [[ -f "${EMC2_HOME}/scripts/rtapi.conf" ]]; then
12+
source "${EMC2_HOME}/scripts/rtapi.conf"
13+
else
14+
source "/etc/linuxcnc/rtapi.conf"
15+
fi
1216

13-
for INSTALLED_FILE in "${EMC2_HOME}"/rtlib/{lincurve,logic,bitslice}"${MODULE_EXT}"; do
17+
for INSTALLED_FILE in "${RTLIB_DIR}"/{lincurve,logic,bitslice}"${MODULE_EXT}"; do
1418
if [[ ! -f "${INSTALLED_FILE}" ]]; then
1519
echo "'halcompile --install' did not install '${INSTALLED_FILE}'"
1620
exit 1

tests/halcompile/userspace-count-names/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
set -e
33

4-
halcompile --install userspace_count_names.comp
4+
${SUDO} halcompile --install userspace_count_names.comp
55

66
INSTALLED_FILE="${EMC2_HOME}/bin/userspace_count_names"
77
if [[ ! -f "${INSTALLED_FILE}" ]]; then

0 commit comments

Comments
 (0)