|
10 | 10 |
|
11 | 11 | jobs: |
12 | 12 | 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 |
14 | 25 | steps: |
15 | 26 | - name: Dump GitHub context |
16 | 27 | env: |
17 | 28 | GITHUB_CONTEXT: ${{ toJson(github) }} |
18 | 29 | 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 |
20 | 41 | 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 |
22 | 44 | 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