Skip to content

Commit c1d5d29

Browse files
committed
fix github ci for 2.8
We used to run our 2.8 build on ubuntu-18.04, but github retired that. This commit changes it to build on Debian Buster and Debian Wheezy, and some changes to make our CI work in docker.
1 parent b3d499f commit c1d5d29

1 file changed

Lines changed: 53 additions & 6 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

0 commit comments

Comments
 (0)