diff --git a/.dockerignore b/.dockerignore index f822325f27..3ce1f5b46a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,7 +2,7 @@ /* # Include Docker image inputs -! /scripts/buildsystem +! /debian/buildsystem # Include MK packages and minimal debian packaging ! /packages/ diff --git a/.drone/drone.yaml b/.drone/drone.yaml index c8ebcd77ae..89f1ddb501 100644 --- a/.drone/drone.yaml +++ b/.drone/drone.yaml @@ -326,1179 +326,2261 @@ # temp: {} # #--- -kind: pipeline -name: Test RIP version on Ubuntu 20.04 amd64 - -platform: - arch: amd64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build RIP and run tests - image: ubuntu:focal - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/ripruntests.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Test RIP version on ubuntu 20.04 arm64 - -platform: - arch: arm64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build RIP and run tests - image: ubuntu:focal - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/ripruntests.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Test RIP version on Ubuntu 20.04 armhf - -platform: - arch: arm - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build RIP and run tests - image: arm32v7/ubuntu:focal - failure: ignore - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/ripruntests.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Test RIP version on Debian 10 amd64 - -platform: - arch: amd64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build RIP and run tests - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/ripruntests.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Test RIP version on Debian 10 arm64 - -platform: - arch: arm64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build RIP and run tests - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/ripruntests.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Test RIP version on Debian 10 armhf - -platform: - arch: arm - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build RIP and run tests - image: arm32v7/debian:buster - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/ripruntests.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Test RIP version on Ubuntu 18.04 amd64 - -platform: - arch: amd64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build RIP and run tests - image: ubuntu:bionic - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/ripruntests.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Test RIP version on Ubuntu 18.04 arm64 - -platform: - arch: arm64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build RIP and run tests - image: ubuntu:bionic - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/ripruntests.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Test RIP version on Ubuntu 18.04 armhf - -platform: - arch: arm - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build RIP and run tests - image: arm32v7/ubuntu:bionic - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/ripruntests.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Test RIP version on Debian 9 amd64 - -platform: - arch: amd64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build RIP and run tests - image: debian:stretch - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/ripruntests.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Test RIP version on Debian 9 arm64 - -platform: - arch: arm64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build RIP and run tests - image: debian:stretch - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/ripruntests.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Test RIP version on Debian 9 armhf - -platform: - arch: arm - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build RIP and run tests - image: arm32v7/debian:stretch - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/ripruntests.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - -# Issue with Docker runtime -> uncomment when the newer one with this bug resolved -# is deployed to Drone Cloud - +#============================================================================================= +# Valid, but need rework for CMake based build +#============================================================================================= +#kind: pipeline +#name: Test RIP version on Ubuntu 20.04 amd64 +# +#platform: +# arch: amd64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build RIP and run tests +# image: ubuntu:focal +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/ripruntests.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Test RIP version on ubuntu 20.04 arm64 +# +#platform: +# arch: arm64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build RIP and run tests +# image: ubuntu:focal +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/ripruntests.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Test RIP version on Ubuntu 20.04 armhf +# +#platform: +# arch: arm +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build RIP and run tests +# image: arm32v7/ubuntu:focal +# failure: ignore +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/ripruntests.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Test RIP version on Debian 10 amd64 +# +#platform: +# arch: amd64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build RIP and run tests +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/ripruntests.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Test RIP version on Debian 10 arm64 +# +#platform: +# arch: arm64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build RIP and run tests +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/ripruntests.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Test RIP version on Debian 10 armhf +# +#platform: +# arch: arm +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build RIP and run tests +# image: arm32v7/debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/ripruntests.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Test RIP version on Ubuntu 18.04 amd64 +# +#platform: +# arch: amd64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build RIP and run tests +# image: ubuntu:bionic +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/ripruntests.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Test RIP version on Ubuntu 18.04 arm64 +# +#platform: +# arch: arm64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build RIP and run tests +# image: ubuntu:bionic +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/ripruntests.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Test RIP version on Ubuntu 18.04 armhf +# +#platform: +# arch: arm +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build RIP and run tests +# image: arm32v7/ubuntu:bionic +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/ripruntests.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Test RIP version on Debian 9 amd64 +# +#platform: +# arch: amd64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build RIP and run tests +# image: debian:stretch +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/ripruntests.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Test RIP version on Debian 9 arm64 +# +#platform: +# arch: arm64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build RIP and run tests +# image: debian:stretch +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/ripruntests.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Test RIP version on Debian 9 armhf +# +#platform: +# arch: arm +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build RIP and run tests +# image: arm32v7/debian:stretch +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/ripruntests.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +## Issue with Docker runtime -> uncomment when the newer one with this bug resolved +## is deployed to Drone Cloud +# +##--- +##kind: pipeline +##name: Build packages for Ubuntu 21.04 amd64 +## +##platform: +## arch: amd64 +## +##clone: +## disable: true +## +##steps: +##- name: Prepare Docker Drone volume +## image: debian:buster +## volumes: +## - name: repository +## path: /build +## commands: +## - chown 1000:1000 /build +## +##- name: Clone Machinekit-HAL repository +## image: debian:buster +## volumes: +## - name: repository +## path: /build +## commands: +## - apt-get update +## - apt-get install -y git +## - addgroup --gid 1000 git +## - | +## adduser --uid 1000 --ingroup git --home /home/git \ +## --disabled-password --gecos "" git; +## - | +## su git -c " +## git init /build/machinekit-hal; +## git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +## git -C /build/machinekit-hal config --local gc.auto 0; +## if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +## then +## git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +## --progress --no-recurse-submodules \ +## origin +refs/heads/*:refs/remotes/origin/* \ +## +refs/tags/*:refs/tags/* \ +## +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +## git -C /build/machinekit-hal checkout --progress --force \ +## refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +## elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +## then +## git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +## --progress --no-recurse-submodules origin \ +## +refs/heads/*:refs/remotes/origin/* \ +## +refs/tags/*:refs/tags/*; +## git -C /build/machinekit-hal checkout --progress --force \ +## -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +## else +## printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +## exit 1; +## fi +## git -C /build/machinekit-hal log -1;" +## +##- name: Build Debian packages +## image: ubuntu:hirsute +## volumes: +## - name: repository +## path: /build +## commands: +## - uname -a +## - uname -m +## - > +## export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +## ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +## - apt-get update +## - apt-get -y upgrade +## - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +## - | +## echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +## - | +## curl -1sLf \ +## 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +## | bash +## - addgroup --gid 1000 machinekit +## - | +## adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +## --disabled-password --gecos "" machinekit; +## - | +## su machinekit -c "whoami; \ +## cd /build/machinekit-hal; \ +## debian/bootstrap; \ +## mk-build-deps -irs sudo -t \ +## 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +## debian/configure.py -c; \ +## debian/buildpackages.py;" +## +##volumes: +##- name: repository +## user: 1000 +## group: 1000 +## temp: {} +## +##--- +##kind: pipeline +##name: Build packages for Ubuntu 21.04 arm64 +## +##platform: +## arch: arm64 +## +##clone: +## disable: true +## +##steps: +##- name: Prepare Docker Drone volume +## image: debian:buster +## volumes: +## - name: repository +## path: /build +## commands: +## - chown 1000:1000 /build +## +##- name: Clone Machinekit-HAL repository +## image: debian:buster +## volumes: +## - name: repository +## path: /build +## commands: +## - apt-get update +## - apt-get install -y git +## - addgroup --gid 1000 git +## - | +## adduser --uid 1000 --ingroup git --home /home/git \ +## --disabled-password --gecos "" git; +## - | +## su git -c " +## git init /build/machinekit-hal; +## git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +## git -C /build/machinekit-hal config --local gc.auto 0; +## if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +## then +## git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +## --progress --no-recurse-submodules \ +## origin +refs/heads/*:refs/remotes/origin/* \ +## +refs/tags/*:refs/tags/* \ +## +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +## git -C /build/machinekit-hal checkout --progress --force \ +## refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +## elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +## then +## git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +## --progress --no-recurse-submodules origin \ +## +refs/heads/*:refs/remotes/origin/* \ +## +refs/tags/*:refs/tags/*; +## git -C /build/machinekit-hal checkout --progress --force \ +## -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +## else +## printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +## exit 1; +## fi +## git -C /build/machinekit-hal log -1;" +## +##- name: Build Debian packages +## image: ubuntu:hirsute +## volumes: +## - name: repository +## path: /build +## commands: +## - uname -a +## - uname -m +## - > +## export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +## ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +## - apt-get update +## - apt-get -y upgrade +## - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +## - | +## echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +## - | +## curl -1sLf \ +## 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +## | bash +## - addgroup --gid 1000 machinekit +## - | +## adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +## --disabled-password --gecos "" machinekit; +## - | +## su machinekit -c "whoami; \ +## cd /build/machinekit-hal; \ +## debian/bootstrap; \ +## mk-build-deps -irs sudo -t \ +## 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +## debian/configure.py -c; \ +## debian/buildpackages.py;" +## +##volumes: +##- name: repository +## user: 1000 +## group: 1000 +## temp: {} +## +##--- +##kind: pipeline +##name: Build packages for Ubuntu 21.04 armhf +## +##platform: +## arch: arm +## +##clone: +## disable: true +## +##steps: +##- name: Prepare Docker Drone volume +## image: debian:buster +## volumes: +## - name: repository +## path: /build +## commands: +## - chown 1000:1000 /build +## +##- name: Clone Machinekit-HAL repository +## image: debian:buster +## volumes: +## - name: repository +## path: /build +## commands: +## - apt-get update +## - apt-get install -y git +## - addgroup --gid 1000 git +## - | +## adduser --uid 1000 --ingroup git --home /home/git \ +## --disabled-password --gecos "" git; +## - | +## su git -c " +## git init /build/machinekit-hal; +## git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +## git -C /build/machinekit-hal config --local gc.auto 0; +## if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +## then +## git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +## --progress --no-recurse-submodules \ +## origin +refs/heads/*:refs/remotes/origin/* \ +## +refs/tags/*:refs/tags/* \ +## +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +## git -C /build/machinekit-hal checkout --progress --force \ +## refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +## elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +## then +## git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +## --progress --no-recurse-submodules origin \ +## +refs/heads/*:refs/remotes/origin/* \ +## +refs/tags/*:refs/tags/*; +## git -C /build/machinekit-hal checkout --progress --force \ +## -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +## else +## printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +## exit 1; +## fi +## git -C /build/machinekit-hal log -1;" +## +##- name: Build Debian packages +## image: arm32v7/ubuntu:hirsute +## failure: ignore +## volumes: +## - name: repository +## path: /build +## commands: +## - uname -a +## - uname -m +## - > +## export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +## ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +## - apt-get update +## - apt-get -y upgrade +## - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +## - | +## echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +## - | +## curl -1sLf \ +## 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +## | bash +## - addgroup --gid 1000 machinekit +## - | +## adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +## --disabled-password --gecos "" machinekit; +## - | +## su machinekit -c "whoami; \ +## cd /build/machinekit-hal; \ +## debian/bootstrap; \ +## mk-build-deps -irs sudo -t \ +## 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +## debian/configure.py -c; \ +## debian/buildpackages.py;" +## +##volumes: +##- name: repository +## user: 1000 +## group: 1000 +## temp: {} +#--- +#kind: pipeline +#name: Build packages for Ubuntu 20.04 amd64 +# +#platform: +# arch: amd64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build Debian packages +# image: ubuntu:focal +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/configure.py -c; \ +# debian/buildpackages.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Build packages for Ubuntu 20.04 arm64 +# +#platform: +# arch: arm64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build Debian packages +# image: ubuntu:focal +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/configure.py -c; \ +# debian/buildpackages.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Build packages for Ubuntu 20.04 armhf +# +#platform: +# arch: arm +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build Debian packages +# image: arm32v7/ubuntu:focal +# failure: ignore +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/configure.py -c; \ +# debian/buildpackages.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Build packages for Debian 10 amd64 +# +#platform: +# arch: amd64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build Debian packages +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/configure.py -c; \ +# debian/buildpackages.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Build packages for Debian 10 arm64 +# +#platform: +# arch: arm64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build Debian packages +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/configure.py -c; \ +# debian/buildpackages.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Build packages for Debian 10 armhf +# +#platform: +# arch: arm +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build Debian packages +# image: arm32v7/debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/configure.py -c; \ +# debian/buildpackages.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Build packages for Ubuntu 18.04 amd64 +# +#platform: +# arch: amd64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build Debian packages +# image: ubuntu:bionic +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/configure.py -c; \ +# debian/buildpackages.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# +#--- +#kind: pipeline +#name: Build packages for Ubuntu 18.04 arm64 +# +#platform: +# arch: arm64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build Debian packages +# image: ubuntu:bionic +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/configure.py -c; \ +# debian/buildpackages.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# #--- #kind: pipeline -#name: Build packages for Ubuntu 21.04 amd64 +#name: Build packages for Ubuntu 18.04 armhf # #platform: -# arch: amd64 +# arch: arm # #clone: # disable: true @@ -1553,7 +2635,7 @@ volumes: # git -C /build/machinekit-hal log -1;" # #- name: Build Debian packages -# image: ubuntu:hirsute +# image: arm32v7/ubuntu:bionic # volumes: # - name: repository # path: /build @@ -1590,10 +2672,108 @@ volumes: # user: 1000 # group: 1000 # temp: {} -# +# +#--- +#kind: pipeline +#name: Build packages for Debian 9 amd64 +# +#platform: +# arch: amd64 +# +#clone: +# disable: true +# +#steps: +#- name: Prepare Docker Drone volume +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - chown 1000:1000 /build +# +#- name: Clone Machinekit-HAL repository +# image: debian:buster +# volumes: +# - name: repository +# path: /build +# commands: +# - apt-get update +# - apt-get install -y git +# - addgroup --gid 1000 git +# - | +# adduser --uid 1000 --ingroup git --home /home/git \ +# --disabled-password --gecos "" git; +# - | +# su git -c " +# git init /build/machinekit-hal; +# git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; +# git -C /build/machinekit-hal config --local gc.auto 0; +# if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules \ +# origin +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/* \ +# +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# git -C /build/machinekit-hal checkout --progress --force \ +# refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; +# elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] +# then +# git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ +# --progress --no-recurse-submodules origin \ +# +refs/heads/*:refs/remotes/origin/* \ +# +refs/tags/*:refs/tags/*; +# git -C /build/machinekit-hal checkout --progress --force \ +# -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; +# else +# printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; +# exit 1; +# fi +# git -C /build/machinekit-hal log -1;" +# +#- name: Build Debian packages +# image: debian:stretch +# volumes: +# - name: repository +# path: /build +# commands: +# - uname -a +# - uname -m +# - > +# export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +# ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 +# - apt-get update +# - apt-get -y upgrade +# - apt-get -y install sudo curl build-essential fakeroot devscripts python +# - | +# echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +# - | +# curl -1sLf \ +# 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ +# | bash +# - addgroup --gid 1000 machinekit +# - | +# adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ +# --disabled-password --gecos "" machinekit; +# - | +# su machinekit -c "whoami; \ +# cd /build/machinekit-hal; \ +# debian/bootstrap; \ +# mk-build-deps -irs sudo -t \ +# 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ +# debian/configure.py -c; \ +# debian/buildpackages.py;" +# +#volumes: +#- name: repository +# user: 1000 +# group: 1000 +# temp: {} +# #--- #kind: pipeline -#name: Build packages for Ubuntu 21.04 arm64 +#name: Build packages for Debian 9 arm64 # #platform: # arch: arm64 @@ -1651,7 +2831,7 @@ volumes: # git -C /build/machinekit-hal log -1;" # #- name: Build Debian packages -# image: ubuntu:hirsute +# image: debian:stretch # volumes: # - name: repository # path: /build @@ -1663,7 +2843,7 @@ volumes: # ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 # - apt-get update # - apt-get -y upgrade -# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - apt-get -y install sudo curl build-essential fakeroot devscripts python # - | # echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers # - | @@ -1691,7 +2871,7 @@ volumes: # #--- #kind: pipeline -#name: Build packages for Ubuntu 21.04 armhf +#name: Build packages for Debian 9 armhf # #platform: # arch: arm @@ -1749,8 +2929,7 @@ volumes: # git -C /build/machinekit-hal log -1;" # #- name: Build Debian packages -# image: arm32v7/ubuntu:hirsute -# failure: ignore +# image: arm32v7/debian:stretch # volumes: # - name: repository # path: /build @@ -1762,7 +2941,7 @@ volumes: # ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 # - apt-get update # - apt-get -y upgrade -# - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs +# - apt-get -y install sudo curl build-essential fakeroot devscripts python # - | # echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers # - | @@ -1787,1179 +2966,3 @@ volumes: # user: 1000 # group: 1000 # temp: {} ---- -kind: pipeline -name: Build packages for Ubuntu 20.04 amd64 - -platform: - arch: amd64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build Debian packages - image: ubuntu:focal - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/configure.py -c; \ - debian/buildpackages.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Build packages for Ubuntu 20.04 arm64 - -platform: - arch: arm64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build Debian packages - image: ubuntu:focal - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/configure.py -c; \ - debian/buildpackages.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Build packages for Ubuntu 20.04 armhf - -platform: - arch: arm - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build Debian packages - image: arm32v7/ubuntu:focal - failure: ignore - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/configure.py -c; \ - debian/buildpackages.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Build packages for Debian 10 amd64 - -platform: - arch: amd64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build Debian packages - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/configure.py -c; \ - debian/buildpackages.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Build packages for Debian 10 arm64 - -platform: - arch: arm64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build Debian packages - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/configure.py -c; \ - debian/buildpackages.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Build packages for Debian 10 armhf - -platform: - arch: arm - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build Debian packages - image: arm32v7/debian:buster - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/configure.py -c; \ - debian/buildpackages.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Build packages for Ubuntu 18.04 amd64 - -platform: - arch: amd64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build Debian packages - image: ubuntu:bionic - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/configure.py -c; \ - debian/buildpackages.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Build packages for Ubuntu 18.04 arm64 - -platform: - arch: arm64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build Debian packages - image: ubuntu:bionic - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/configure.py -c; \ - debian/buildpackages.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Build packages for Ubuntu 18.04 armhf - -platform: - arch: arm - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build Debian packages - image: arm32v7/ubuntu:bionic - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python equivs - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/configure.py -c; \ - debian/buildpackages.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Build packages for Debian 9 amd64 - -platform: - arch: amd64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build Debian packages - image: debian:stretch - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/configure.py -c; \ - debian/buildpackages.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Build packages for Debian 9 arm64 - -platform: - arch: arm64 - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build Debian packages - image: debian:stretch - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/configure.py -c; \ - debian/buildpackages.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} - ---- -kind: pipeline -name: Build packages for Debian 9 armhf - -platform: - arch: arm - -clone: - disable: true - -steps: -- name: Prepare Docker Drone volume - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - chown 1000:1000 /build - -- name: Clone Machinekit-HAL repository - image: debian:buster - volumes: - - name: repository - path: /build - commands: - - apt-get update - - apt-get install -y git - - addgroup --gid 1000 git - - | - adduser --uid 1000 --ingroup git --home /home/git \ - --disabled-password --gecos "" git; - - | - su git -c " - git init /build/machinekit-hal; - git -C /build/machinekit-hal remote add origin ${DRONE_GIT_HTTP_URL}; - git -C /build/machinekit-hal config --local gc.auto 0; - if [[ \"$DRONE_BUILD_EVENT\" == \"pull_request\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules \ - origin +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/* \ - +${DRONE_COMMIT_SHA}:refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - git -C /build/machinekit-hal checkout --progress --force \ - refs/remotes/pull/${DRONE_PULL_REQUEST}/merge; - elif [[ \"$DRONE_BUILD_EVENT\" == \"push\" ]] - then - git -C /build/machinekit-hal -c protocol.version=2 fetch --prune \ - --progress --no-recurse-submodules origin \ - +refs/heads/*:refs/remotes/origin/* \ - +refs/tags/*:refs/tags/*; - git -C /build/machinekit-hal checkout --progress --force \ - -B ${DRONE_COMMIT_BRANCH} refs/remotes/origin/${DRONE_COMMIT_BRANCH}; - else - printf \"ERROR: Unsupported event %s.\n\" \"$DRONE_BUILD_EVENT\"; - exit 1; - fi - git -C /build/machinekit-hal log -1;" - -- name: Build Debian packages - image: arm32v7/debian:stretch - volumes: - - name: repository - path: /build - commands: - - uname -a - - uname -m - - > - export DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true - ENV LC_ALL=C.UTF-8 ENV LANGUAGE=C.UTF-8 ENV LANG=C.UTF-8 - - apt-get update - - apt-get -y upgrade - - apt-get -y install sudo curl build-essential fakeroot devscripts python - - | - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - - | - curl -1sLf \ - 'https://dl.cloudsmith.io/public/machinekit/machinekit/cfg/setup/bash.deb.sh' \ - | bash - - addgroup --gid 1000 machinekit - - | - adduser --uid 1000 --ingroup machinekit --home /home/machinekit \ - --disabled-password --gecos "" machinekit; - - | - su machinekit -c "whoami; \ - cd /build/machinekit-hal; \ - debian/bootstrap; \ - mk-build-deps -irs sudo -t \ - 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'; \ - debian/configure.py -c; \ - debian/buildpackages.py;" - -volumes: -- name: repository - user: 1000 - group: 1000 - temp: {} diff --git a/.github/workflows/debian-builder-workflow.yaml b/.github/workflows/debian-builder-workflow.yaml index f39216d2f2..77668a8890 100644 --- a/.github/workflows/debian-builder-workflow.yaml +++ b/.github/workflows/debian-builder-workflow.yaml @@ -5,7 +5,7 @@ # the builder/tester CI/CD workflow for Debian based # systems. # -# Copyright (C) 2020 Jakub Fišer +# Copyright (C) 2020 - Jakub Fišer # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -102,7 +102,7 @@ jobs: "===========================================================\n" echo "$ALLOWED_COMBINATIONS" | jq '.' env: - BASE_JSON_FILE: './machinekit-hal/scripts/debian-distro-settings.json' + BASE_JSON_FILE: './machinekit-hal/debian/buildsystem/debian-distro-settings.json' - name: Download data from Github Packages Docker registry id: docker_data_downloader @@ -242,7 +242,7 @@ jobs: " not going to force rebuild.\n" env: BEFORE_COMMIT_SHA: ${{ steps.docker_metadata_normalizer.outputs.git_sha }} - DOCKER_REGEX: '^(scripts/(((containers/){0,1}buildsystem/debian/.{1,})|buildcontainerimage.py|debian-distro-settings.json))|debian/.{1,}$' + DOCKER_REGEX: '^debian/.{1,}$' working-directory: ./machinekit-hal - name: Prepare matrixes for creation of following jobs @@ -344,172 +344,172 @@ jobs: echo "::set-output name=timestamp::$TIMESTAMP" printf "Timestamp for this workflow run is $TIMESTAMP\n" - buildMachinekitHALDebianPackages: - name: > - Package ${{ matrix.osDistribution }} ${{ matrix.osVersionCodename }}, - ${{ matrix.architecture }} - runs-on: ubuntu-latest - needs: prepareState - strategy: - matrix: ${{ fromJson(needs.prepareState.outputs.MainMatrix) }} - fail-fast: false - - steps: - # Building packages needs deep clone for the ability to create a version - # number by counting all commits - - name: Clone Machinekit-HAL repository - uses: actions/checkout@v2 - with: - ref: '${{ github.event.ref }}' - fetch-depth: '0' - path: 'build/machinekit-hal' - - - name: Prepare specific Python version for Machinekit-HAL build scripts - if: needs.prepareState.outputs.BuildDockerImages == 'true' - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - - name: Install Python SH tool to runner VM environment - if: needs.prepareState.outputs.BuildDockerImages == 'true' - run: pip install sh - - - name: > - Prepare distribution name '${{ matrix.osDistribution}}' for use - in paths - run: | - DISTRIBUTION_LOWER=$(echo "$DISTRIBUTION" | awk '{print tolower($0)}') - echo "distribution_normalized=$DISTRIBUTION_LOWER" >> $GITHUB_ENV - env: - DISTRIBUTION: ${{ matrix.osDistribution}} - - - name: Prepare the Docker image - run: | - if [ "${{ needs.prepareState.outputs.BuildDockerImages }}" == "true" ] - then - scripts/buildcontainerimage.py -d ${IMAGE_NAME_PREFIX} \ - ${DISTRIBUTION} \ - ${VERSION} \ - ${ARCHITECTURE} - exit 0 - fi - printf "${{ env.GITHUB_TOKEN}}" | docker login docker.pkg.github.com \ - -u $GITHUB_OWNER --password-stdin - docker pull ${IMAGE_NAME_PREFIX}/${IMAGE_NAME_BASE}:${DOCKER_TAG} - IMAGE_INFO=$(docker image inspect \ - ${IMAGE_NAME_PREFIX}/${IMAGE_NAME_BASE}:${DOCKER_TAG}) - IMAGE_ID=$(jq -r '.[].Id' <<< "$IMAGE_INFO") - printf "%b" \ - "Git SHA of downloaded Docker image: $IMAGE_ID\n" \ - "Git SHA of cached Docker image passed from preparatory job:" \ - " $ {{ matrix.dockerImage.imageDigest }}" - if [[ "$IMAGE_ID" != "${{ matrix.dockerImage.imageDigest }}" ]] - then - ERROR=$(printf "%b" \ - "Git SHA label of downloaded docker image IMAGE_ID") \ - " does not match the expected" \ - "${{ matrix.dockerImage.imageDigest }}.\n" \ - "Please try rerunning this workflow!\n" - echo "::error::$ERROR" - exit 1 - fi - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - IMAGE_NAME_PREFIX: 'docker.pkg.github.com/${{ github.repository }}' - IMAGE_NAME_BASE: '${{ matrix.dockerImage.basename }}' - GITHUB_OWNER: ${{ github.actor }} - DISTRIBUTION: ${{ matrix.osDistribution}} - VERSION: ${{ matrix.osVersionCodename}} - ARCHITECTURE: ${{ matrix.architecture}} - DOCKER_TAG: 'latest' - working-directory: ./build/machinekit-hal - - - name: > - Bootstrap Machinekit-HAL repository for ${{ matrix.osDistribution }} - package build for ${{ matrix.osVersionCodename}}, - ${{ matrix.architecture }} - run: | - docker run --tty --rm -u "$(id -u):$(id -g)" \ - -v "$(pwd):/home/machinekit/build" \ - -w "/home/machinekit/build/machinekit-hal" \ - ${DOCKER_IMAGE} \ - debian/bootstrap - env: - DOCKER_IMAGE: 'docker.pkg.github.com/${{ github.repository }}/${{ matrix.dockerImage.basename }}:latest' - working-directory: ./build - - - name: > - Configure Machinekit-HAL repository for ${{ matrix.osDistribution }} - package build for ${{ matrix.osVersionCodename}}, - ${{ matrix.architecture }} - run: | - docker run --tty --rm -u "$(id -u):$(id -g)" \ - -v "$(pwd):/home/machinekit/build" \ - -w "/home/machinekit/build/machinekit-hal" \ - ${DOCKER_IMAGE} \ - debian/configure.py -c - env: - DOCKER_IMAGE: 'docker.pkg.github.com/${{ github.repository }}/${{ matrix.dockerImage.basename }}:latest' - working-directory: ./build - - - name: > - Build Machinekit-HAL ${{ matrix.osDistribution }} package for - ${{ matrix.osVersionCodename}}, ${{ matrix.architecture }} - run: | - docker run --tty --rm -u "$(id -u):$(id -g)" \ - -v "$(pwd):/home/machinekit/build" \ - -w "/home/machinekit/build/machinekit-hal" \ - ${DOCKER_IMAGE} \ - debian/buildpackages.py - env: - DOCKER_IMAGE: 'docker.pkg.github.com/${{ github.repository }}/${{ matrix.dockerImage.basename }}:latest' - working-directory: ./build - - - name: Sign the package with Machinekit Builder Signer Key - if: > - github.event_name == 'push' && - needs.prepareState.outputs.HasSigningKey == 'true' - run: | - mkdir ${ROOT_DIR}/secrets_mountpoint - sudo mount -t tmpfs -o size=50m tmpfs ${ROOT_DIR}/secrets_mountpoint - echo "$SIGNING_KEY" > ${ROOT_DIR}/secrets_mountpoint/key.gpg - echo " - #!/bin/bash -e - gpg --homedir /secrets_mountpoint/.gnupg -v --batch --import \ - '/secrets_mountpoint/key.gpg' - find /machinekit-hal -maxdepth 1 -name *.deb -print0 | \ - xargs -0 -n1 -t -I '{}' dpkg-sig --gpg-options \ - '--homedir /secrets_mountpoint/.gnupg' --sign builder '{}' - " > ${ROOT_DIR}/secrets_mountpoint/doSignPackages.sh - docker run --rm --tty \ - -v "${ROOT_DIR}/secrets_mountpoint:/secrets_mountpoint" \ - -v "$(pwd):/machinekit-hal" -u "$(id -u):$(id -g)" \ - ${DOCKER_IMAGE} \ - /bin/bash /secrets_mountpoint/doSignPackages.sh - sudo umount ${ROOT_DIR}/secrets_mountpoint - env: - ROOT_DIR: ${{ github.workspace }} - SIGNING_KEY: ${{ secrets.SIGNING_KEY }} - DOCKER_IMAGE: 'docker.pkg.github.com/${{ github.repository }}/${{ matrix.dockerImage.basename }}:latest' - working-directory: ./build - - - name: Prepare build artifact for upload - run: | - mkdir machinekit-hal-${{ env.distribution_normalized }} - find ./build -depth -not \( \ - -path "." -or -path "./build" -or -path "./build/machinekit-hal" -or \ - -path "./build/machinekit-hal/*" \) -print0 | \ - xargs -0 -t -I '{}' cp -v '{}' \ - ./machinekit-hal-${{ env.distribution_normalized }} - - - name: > - Upload built package for ${{ matrix.osDistribution }} - ${{ matrix.osVersionCodename}}, ${{ matrix.architecture }} - as an artifact - uses: actions/upload-artifact@v2 - with: - name: machinekit-hal-${{ env.distribution_normalized }}-${{ matrix.architecture }}-${{ matrix.osVersionNumber }}-${{ github.sha }}-${{ needs.prepareState.outputs.Timestamp }} - path: machinekit-hal-${{ env.distribution_normalized }} +# buildMachinekitHALDebianPackages: +# name: > +# Package ${{ matrix.osDistribution }} ${{ matrix.osVersionCodename }}, +# ${{ matrix.architecture }} +# runs-on: ubuntu-latest +# needs: prepareState +# strategy: +# matrix: ${{ fromJson(needs.prepareState.outputs.MainMatrix) }} +# fail-fast: false +# +# steps: +# # Building packages needs deep clone for the ability to create a version +# # number by counting all commits +# - name: Clone Machinekit-HAL repository +# uses: actions/checkout@v2 +# with: +# ref: '${{ github.event.ref }}' +# fetch-depth: '0' +# path: 'build/machinekit-hal' +# +# - name: Prepare specific Python version for Machinekit-HAL build scripts +# if: needs.prepareState.outputs.BuildDockerImages == 'true' +# uses: actions/setup-python@v2 +# with: +# python-version: '3.8' +# +# - name: Install Python SH tool to runner VM environment +# if: needs.prepareState.outputs.BuildDockerImages == 'true' +# run: pip install sh +# +# - name: > +# Prepare distribution name '${{ matrix.osDistribution}}' for use +# in paths +# run: | +# DISTRIBUTION_LOWER=$(echo "$DISTRIBUTION" | awk '{print tolower($0)}') +# echo "distribution_normalized=$DISTRIBUTION_LOWER" >> $GITHUB_ENV +# env: +# DISTRIBUTION: ${{ matrix.osDistribution}} +# +# - name: Prepare the Docker image +# run: | +# if [ "${{ needs.prepareState.outputs.BuildDockerImages }}" == "true" ] +# then +# scripts/buildcontainerimage.py -d ${IMAGE_NAME_PREFIX} \ +# ${DISTRIBUTION} \ +# ${VERSION} \ +# ${ARCHITECTURE} +# exit 0 +# fi +# printf "${{ env.GITHUB_TOKEN}}" | docker login docker.pkg.github.com \ +# -u $GITHUB_OWNER --password-stdin +# docker pull ${IMAGE_NAME_PREFIX}/${IMAGE_NAME_BASE}:${DOCKER_TAG} +# IMAGE_INFO=$(docker image inspect \ +# ${IMAGE_NAME_PREFIX}/${IMAGE_NAME_BASE}:${DOCKER_TAG}) +# IMAGE_ID=$(jq -r '.[].Id' <<< "$IMAGE_INFO") +# printf "%b" \ +# "Git SHA of downloaded Docker image: $IMAGE_ID\n" \ +# "Git SHA of cached Docker image passed from preparatory job:" \ +# " $ {{ matrix.dockerImage.imageDigest }}" +# if [[ "$IMAGE_ID" != "${{ matrix.dockerImage.imageDigest }}" ]] +# then +# ERROR=$(printf "%b" \ +# "Git SHA label of downloaded docker image IMAGE_ID") \ +# " does not match the expected" \ +# "${{ matrix.dockerImage.imageDigest }}.\n" \ +# "Please try rerunning this workflow!\n" +# echo "::error::$ERROR" +# exit 1 +# fi +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# IMAGE_NAME_PREFIX: 'docker.pkg.github.com/${{ github.repository }}' +# IMAGE_NAME_BASE: '${{ matrix.dockerImage.basename }}' +# GITHUB_OWNER: ${{ github.actor }} +# DISTRIBUTION: ${{ matrix.osDistribution}} +# VERSION: ${{ matrix.osVersionCodename}} +# ARCHITECTURE: ${{ matrix.architecture}} +# DOCKER_TAG: 'latest' +# working-directory: ./build/machinekit-hal +# +# - name: > +# Bootstrap Machinekit-HAL repository for ${{ matrix.osDistribution }} +# package build for ${{ matrix.osVersionCodename}}, +# ${{ matrix.architecture }} +# run: | +# docker run --tty --rm -u "$(id -u):$(id -g)" \ +# -v "$(pwd):/home/machinekit/build" \ +# -w "/home/machinekit/build/machinekit-hal" \ +# ${DOCKER_IMAGE} \ +# debian/bootstrap +# env: +# DOCKER_IMAGE: 'docker.pkg.github.com/${{ github.repository }}/${{ matrix.dockerImage.basename }}:latest' +# working-directory: ./build +# +# - name: > +# Configure Machinekit-HAL repository for ${{ matrix.osDistribution }} +# package build for ${{ matrix.osVersionCodename}}, +# ${{ matrix.architecture }} +# run: | +# docker run --tty --rm -u "$(id -u):$(id -g)" \ +# -v "$(pwd):/home/machinekit/build" \ +# -w "/home/machinekit/build/machinekit-hal" \ +# ${DOCKER_IMAGE} \ +# debian/configure.py -c +# env: +# DOCKER_IMAGE: 'docker.pkg.github.com/${{ github.repository }}/${{ matrix.dockerImage.basename }}:latest' +# working-directory: ./build +# +# - name: > +# Build Machinekit-HAL ${{ matrix.osDistribution }} package for +# ${{ matrix.osVersionCodename}}, ${{ matrix.architecture }} +# run: | +# docker run --tty --rm -u "$(id -u):$(id -g)" \ +# -v "$(pwd):/home/machinekit/build" \ +# -w "/home/machinekit/build/machinekit-hal" \ +# ${DOCKER_IMAGE} \ +# debian/buildpackages.py +# env: +# DOCKER_IMAGE: 'docker.pkg.github.com/${{ github.repository }}/${{ matrix.dockerImage.basename }}:latest' +# working-directory: ./build +# +# - name: Sign the package with Machinekit Builder Signer Key +# if: > +# github.event_name == 'push' && +# needs.prepareState.outputs.HasSigningKey == 'true' +# run: | +# mkdir ${ROOT_DIR}/secrets_mountpoint +# sudo mount -t tmpfs -o size=50m tmpfs ${ROOT_DIR}/secrets_mountpoint +# echo "$SIGNING_KEY" > ${ROOT_DIR}/secrets_mountpoint/key.gpg +# echo " +# #!/bin/bash -e +# gpg --homedir /secrets_mountpoint/.gnupg -v --batch --import \ +# '/secrets_mountpoint/key.gpg' +# find /machinekit-hal -maxdepth 1 -name *.deb -print0 | \ +# xargs -0 -n1 -t -I '{}' dpkg-sig --gpg-options \ +# '--homedir /secrets_mountpoint/.gnupg' --sign builder '{}' +# " > ${ROOT_DIR}/secrets_mountpoint/doSignPackages.sh +# docker run --rm --tty \ +# -v "${ROOT_DIR}/secrets_mountpoint:/secrets_mountpoint" \ +# -v "$(pwd):/machinekit-hal" -u "$(id -u):$(id -g)" \ +# ${DOCKER_IMAGE} \ +# /bin/bash /secrets_mountpoint/doSignPackages.sh +# sudo umount ${ROOT_DIR}/secrets_mountpoint +# env: +# ROOT_DIR: ${{ github.workspace }} +# SIGNING_KEY: ${{ secrets.SIGNING_KEY }} +# DOCKER_IMAGE: 'docker.pkg.github.com/${{ github.repository }}/${{ matrix.dockerImage.basename }}:latest' +# working-directory: ./build +# +# - name: Prepare build artifact for upload +# run: | +# mkdir machinekit-hal-${{ env.distribution_normalized }} +# find ./build -depth -not \( \ +# -path "." -or -path "./build" -or -path "./build/machinekit-hal" -or \ +# -path "./build/machinekit-hal/*" \) -print0 | \ +# xargs -0 -t -I '{}' cp -v '{}' \ +# ./machinekit-hal-${{ env.distribution_normalized }} +# +# - name: > +# Upload built package for ${{ matrix.osDistribution }} +# ${{ matrix.osVersionCodename}}, ${{ matrix.architecture }} +# as an artifact +# uses: actions/upload-artifact@v2 +# with: +# name: machinekit-hal-${{ env.distribution_normalized }}-${{ matrix.architecture }}-${{ matrix.osVersionNumber }}-${{ github.sha }}-${{ needs.prepareState.outputs.Timestamp }} +# path: machinekit-hal-${{ env.distribution_normalized }} testMachinekitHALBuild: name: > @@ -549,7 +549,7 @@ jobs: if: needs.prepareState.outputs.BuildDockerImages == 'true' uses: actions/setup-python@v2 with: - python-version: '3.8' + python-version: '3.9' - name: Install Python SH tool to runner VM environment if: needs.prepareState.outputs.BuildDockerImages == 'true' @@ -559,9 +559,9 @@ jobs: run: | if [ "${{ needs.prepareState.outputs.BuildDockerImages }}" == "true" ] then - scripts/buildcontainerimage.py -d ${IMAGE_NAME_PREFIX} \ - ${DISTRIBUTION} \ - ${VERSION} \ + debian/buildcontainerimage.py -d ${IMAGE_NAME_PREFIX} \ + ${DISTRIBUTION} \ + ${VERSION} \ ${ARCHITECTURE} exit 0 fi @@ -598,19 +598,16 @@ jobs: - name: Execute Runtests run: | - docker run --tty --rm -u "$(id -u):$(id -g)" \ - -v "$(pwd):/home/machinekit/build/machinekit-hal" \ - -w "/home/machinekit/build/machinekit-hal" \ - --cap-add=sys_nice \ - ${DOCKER_IMAGE} \ - debian/ripruntests.py + docker run --tty --rm -u "$(id -u):$(id -g)" \ + -v "$(pwd):/home/machinekit/build/machinekit-hal" \ + -w "/home/machinekit/build/machinekit-hal" \ + --cap-add=sys_nice \ + ${DOCKER_IMAGE} \ + debian/runtests.py -p . -b ./build -g N -c Debug Release RelWithDebInfo env: DOCKER_IMAGE: 'docker.pkg.github.com/${{ github.repository }}/${{ matrix.dockerImage.basename }}:latest' working-directory: ./build/machinekit-hal - - name: Execute CMOCKA UNIT tests - run: printf "Not yet implemented\n" - # This has a chance to cause problems when developing multiple branches # simultaneously all or some of which use different builder configuration, # one way how to solve it is to use different tags for different branches, @@ -626,7 +623,8 @@ jobs: if: > needs.prepareState.outputs.BuildDockerImages == 'true' && github.event_name == 'push' - needs: [buildMachinekitHALDebianPackages, testMachinekitHALBuild, prepareState] + #needs: [buildMachinekitHALDebianPackages, testMachinekitHALBuild, prepareState] + needs: [testMachinekitHALBuild, prepareState] strategy: matrix: ${{ fromJson(needs.prepareState.outputs.MainMatrix) }} fail-fast: true @@ -641,7 +639,7 @@ jobs: - name: Prepare specific Python version for Machinekit-HAL build scripts uses: actions/setup-python@v2 with: - python-version: '3.8' + python-version: '3.9' - name: Install Python SH tool to runner VM environment run: pip install sh @@ -650,9 +648,9 @@ jobs: Build the docker image for ${{ matrix.osDistribution }} ${{ matrix.osVersionCodename}}, ${{ matrix.architecture }} Builder run: | - scripts/buildcontainerimage.py -d ${IMAGE_NAME_PREFIX} \ - ${DISTRIBUTION} \ - ${VERSION} \ + debian/buildcontainerimage.py -d ${IMAGE_NAME_PREFIX} \ + ${DISTRIBUTION} \ + ${VERSION} \ ${ARCHITECTURE} env: IMAGE_NAME_PREFIX: 'docker.pkg.github.com/${{ github.repository }}' @@ -723,79 +721,78 @@ jobs: DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }} DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} - uploadMachinekitHALDebianPackagesToCloudsmith: - name: Upload packages to Cloudsmith hosting service - runs-on: ubuntu-latest - if: > - needs.prepareState.outputs.HasCloudsmithToken == 'true' && - github.event_name == 'push' - needs: [buildMachinekitHALDebianPackages, testMachinekitHALBuild, prepareState] - - steps: - - name: Download all built artifacts from GitHub storage - uses: actions/download-artifact@v2 - with: - path: ./artifacts - - - name: > - Show artifacts downloaded from GitHub storage in directory structure - run: ls -R - working-directory: ./artifacts - - - name: Prepare specific Python version for Cloudsmith CLI - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - - name: Install Cloudsmith CLI tool to runner VM environment - run: | - pip install --upgrade cloudsmith-cli - cloudsmith --help - cloudsmith whoami - env: - CLOUDSMITH_API_KEY: '${{ secrets.CLOUDSMITH_TOKEN }}' - - - name: Upload the Debian packages to Cloudsmith hosting service - run: | - test_array=() - CLOUDSMITH_REPLY=$(cloudsmith list repos --output-format json) - FOUND_NAMESPACE=$(echo "$CLOUDSMITH_REPLY" | \ - jq -e -r --arg INPUTREGEX "$REPOSITORY_REGEX" '.data[] | - select(.slug|test($INPUTREGEX)) | .namespace') - FOUND_REPOSITORY=$(echo "$CLOUDSMITH_REPLY" | \ - jq -e -r --arg INPUTREGEX "$REPOSITORY_REGEX" '.data[] | - select(.slug|test($INPUTREGEX)) | .slug') - if [ "$FOUND_REPOSITORY" == "" -o "$FOUND_REPOSITORY" == "null" \ - -o "$FOUND_NAMESPACE" == "" -o "$FOUND_NAMESPACE" == "null" ] - then - printf "No repository matching regular expression %s found\n" \ - "$REPOSITORY_REGEX" - exit 1 - fi - printf "Found repository %s/%s in Cloudsmith account\n" \ - "$FOUND_NAMESPACE" \ - "$FOUND_REPOSITORY" - while IFS= read -r -d $'\0'; do - test_array+=("$REPLY") - done < <(find . -type f -regextype egrep \ - -iregex "${PACKAGES_REGEX}" -print0) - for package in "${test_array[@]}" - do - [[ "$package" =~ $PACKAGES_REGEX ]] - OSCODENAME=$(echo "$MATRIX_JSON" | \ - jq -r --arg OSVERSIONNUMBER "${BASH_REMATCH[3]}" \ - --arg ARCHITECTURE "${BASH_REMATCH[2]}" \ - '.include[] | select((.osVersionNumber|tostring==$OSVERSIONNUMBER) - and (.architecture==$ARCHITECTURE)) | - .osVersionCodename|ascii_downcase') - cloudsmith push deb \ - ${FOUND_NAMESPACE}/${FOUND_REPOSITORY}/${BASH_REMATCH[1]}/${OSCODENAME} \ - ${package} \ - --republish - done - env: - MATRIX_JSON: '${{ needs.prepareState.outputs.MainMatrix }}' - PACKAGES_REGEX: '^.*/machinekit-hal-([a-z]{1,})-([a-z0-9]{1,})-([0-9\.]{1,})-${{ github.sha }}-${{ needs.prepareState.outputs.Timestamp }}/.{1,}\.d?deb$' - REPOSITORY_REGEX: '^${{ github.event.repository.name }}$' - CLOUDSMITH_API_KEY: '${{ secrets.CLOUDSMITH_TOKEN }}' - +# uploadMachinekitHALDebianPackagesToCloudsmith: +# name: Upload packages to Cloudsmith hosting service +# runs-on: ubuntu-latest +# if: > +# needs.prepareState.outputs.HasCloudsmithToken == 'true' && +# github.event_name == 'push' +# needs: [buildMachinekitHALDebianPackages, testMachinekitHALBuild, prepareState] +# +# steps: +# - name: Download all built artifacts from GitHub storage +# uses: actions/download-artifact@v2 +# with: +# path: ./artifacts +# +# - name: > +# Show artifacts downloaded from GitHub storage in directory structure +# run: ls -R +# working-directory: ./artifacts +# +# - name: Prepare specific Python version for Cloudsmith CLI +# uses: actions/setup-python@v2 +# with: +# python-version: '3.8' +# +# - name: Install Cloudsmith CLI tool to runner VM environment +# run: | +# pip install --upgrade cloudsmith-cli +# cloudsmith --help +# cloudsmith whoami +# env: +# CLOUDSMITH_API_KEY: '${{ secrets.CLOUDSMITH_TOKEN }}' +# +# - name: Upload the Debian packages to Cloudsmith hosting service +# run: | +# test_array=() +# CLOUDSMITH_REPLY=$(cloudsmith list repos --output-format json) +# FOUND_NAMESPACE=$(echo "$CLOUDSMITH_REPLY" | \ +# jq -e -r --arg INPUTREGEX "$REPOSITORY_REGEX" '.data[] | +# select(.slug|test($INPUTREGEX)) | .namespace') +# FOUND_REPOSITORY=$(echo "$CLOUDSMITH_REPLY" | \ +# jq -e -r --arg INPUTREGEX "$REPOSITORY_REGEX" '.data[] | +# select(.slug|test($INPUTREGEX)) | .slug') +# if [ "$FOUND_REPOSITORY" == "" -o "$FOUND_REPOSITORY" == "null" \ +# -o "$FOUND_NAMESPACE" == "" -o "$FOUND_NAMESPACE" == "null" ] +# then +# printf "No repository matching regular expression %s found\n" \ +# "$REPOSITORY_REGEX" +# exit 1 +# fi +# printf "Found repository %s/%s in Cloudsmith account\n" \ +# "$FOUND_NAMESPACE" \ +# "$FOUND_REPOSITORY" +# while IFS= read -r -d $'\0'; do +# test_array+=("$REPLY") +# done < <(find . -type f -regextype egrep \ +# -iregex "${PACKAGES_REGEX}" -print0) +# for package in "${test_array[@]}" +# do +# [[ "$package" =~ $PACKAGES_REGEX ]] +# OSCODENAME=$(echo "$MATRIX_JSON" | \ +# jq -r --arg OSVERSIONNUMBER "${BASH_REMATCH[3]}" \ +# --arg ARCHITECTURE "${BASH_REMATCH[2]}" \ +# '.include[] | select((.osVersionNumber|tostring==$OSVERSIONNUMBER) +# and (.architecture==$ARCHITECTURE)) | +# .osVersionCodename|ascii_downcase') +# cloudsmith push deb \ +# ${FOUND_NAMESPACE}/${FOUND_REPOSITORY}/${BASH_REMATCH[1]}/${OSCODENAME} \ +# ${package} \ +# --republish +# done +# env: +# MATRIX_JSON: '${{ needs.prepareState.outputs.MainMatrix }}' +# PACKAGES_REGEX: '^.*/machinekit-hal-([a-z]{1,})-([a-z0-9]{1,})-([0-9\.]{1,})-${{ github.sha }}-${{ needs.prepareState.outputs.Timestamp }}/.{1,}\.d?deb$' +# REPOSITORY_REGEX: '^${{ github.event.repository.name }}$' +# CLOUDSMITH_API_KEY: '${{ secrets.CLOUDSMITH_TOKEN }}' diff --git a/.gitignore b/.gitignore index ac21684e96..0e1348d23b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,9 +21,6 @@ src/modules.order !/configs/common/emc.nml lib/python/gremlin.py lib/python/touchy -tests/*/skip -tests/*/*/skip -tests/*/*/*/skip /rtlib/ /libexec/ /etc/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 069c94f758..3b5705d79d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,9 @@ cmake_minimum_required(VERSION 3.20) +set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE) +set(CMAKE_EXPORT_LINK_COMMANDS TRUE) + project( Machinekit-HAL VERSION 0.4 # TODO: Get the right version from VERSION file and git @@ -61,7 +64,7 @@ set(MACHINEKIT_HAL_SYSTEM_CONFIG_DIRECTORY "${CMAKE_INSTALL_SYSCONFDIR}/${MACHINEKIT_HAL_PACKAGE_PREFIX_PATH}") set(MACHINEKIT_HAL_LOCAL_STATE_DIRECTORY "${CMAKE_INSTALL_LOCALSTATEDIR}") -list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/tools") +list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/support/cmake/tools") set(CMAKE_C_STANDARD 11) set(CMAKE_CC_STANDARD 17) diff --git a/debian/.gitignore b/debian/.gitignore index 50ccc34168..0118f2b04e 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -14,5 +14,6 @@ /*.debhelper /shlibs.local /files +/__pycache__ !/changelog.in diff --git a/rename_build_workflow/buildcontainerimage.py b/debian/buildcontainerimage.py similarity index 76% rename from rename_build_workflow/buildcontainerimage.py rename to debian/buildcontainerimage.py index 9d95980908..197dc301ac 100755 --- a/rename_build_workflow/buildcontainerimage.py +++ b/debian/buildcontainerimage.py @@ -8,7 +8,7 @@ # for assembling Machinekit-HAL Docker images for building native # binaries # -# Copyright (C) 2020 Jakub Fišer +# Copyright (C) 2020 - Jakub Fišer # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -43,7 +43,16 @@ import json import math import datetime -import machinekit_hal_script_helpers as helpers + +import importlib.util +spec = importlib.util.spec_from_file_location( + "machinekit_hal_script_helpers", + "{0}/support/python/machinekit_hal_script_helpers.py".format( + os.path.realpath( + "{0}/..".format(os.path.dirname(os.path.abspath(__file__))) + ))) +helpers = importlib.util.module_from_spec(spec) +spec.loader.exec_module(helpers) class Buildcontainerimage_script(): @@ -79,8 +88,7 @@ def get_git_data(self: object) -> None: _cwd=self.normalized_path).strip() def load_debian_distro_settings(self: object) -> None: - json_path = "{0}/scripts/debian-distro-settings.json".format( - self.normalized_path) + json_path = f"{self.normalized_path}/debian/buildsystem/debian-distro-settings.json" with open(json_path, "r") as reader: self.debian_settings = json.load(reader) @@ -102,7 +110,7 @@ def can_the_combination_be_build(self: object, distribution, version, architectu return True return False - def build_docker_image(self: object, target, designation, specific_name) -> None: + def build_docker_image(self: object, target, designation, specific_name, network) -> None: if any(tested is None for tested in [self.armed_docker_base_image, self.armed_image_architecture, self.armed_os_version, @@ -112,39 +120,34 @@ def build_docker_image(self: object, target, designation, specific_name) -> None raise ValueError("Not all values are prepared for build.") if specific_name is None: docker_tag = self.debian_settings['imageNameRoot'].replace( - "@DISTRIBUTION@", self.armed_os_name).replace("@TAG@", "{0}_{1}".format( - self.armed_image_architecture, self.armed_os_version)) + "@DISTRIBUTION@", self.armed_os_name).replace("@TAG@", + f"{self.armed_image_architecture}_{self.armed_os_version}") else: docker_tag = specific_name if designation is not None: - docker_tag = "{0}/{1}".format(designation.rstrip("/"), docker_tag) + docker_tag = f"{designation.rstrip('/')}/{docker_tag}" docker_build_arguments = [ - "--build-arg", "DEBIAN_DISTRO_BASE={0}".format( - self.armed_docker_base_image), - "--build-arg", "HOST_ARCHITECTURE={0}".format( - self.armed_image_architecture)] + "--build-arg", f"DEBIAN_DISTRO_BASE={self.armed_docker_base_image}", + "--build-arg", f"HOST_ARCHITECTURE={self.armed_image_architecture}"] docker_labels = [ - "--label", "io.machinekit.machinekit-hal.name={0}".format( - docker_tag), - "--label", "io.machinekit.machinekit-hal.maintainer={0} <{1}>".format( - self.author_name, self.author_email), - "--label", "io.machinekit.machinekit-hal.description=Machinekit-HAL {0} {1} Docker image for {2} architecture.".format( - self.armed_os_name.capitalize(), self.armed_os_codename.capitalize(), self.armed_image_architecture), - "--label", "io.machinekit.machinekit-hal.build-date={0}".format( - datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%SZ")), - "--label", "io.machinekit.machinekit-hal.vcs-ref={0}".format( - self.git_sha), - "--label", "io.machinekit.machinekit-hal.vcs-branch={0}".format( - self.git_branch), - "--label", "io.machinekit.machinekit-hal.vcs-url={0}".format( - self.git_remote_url) + "--label", f"io.machinekit.machinekit-hal.name={docker_tag}", + "--label", f"io.machinekit.machinekit-hal.maintainer={self.author_name} " + f"<{self.author_email}>", + "--label", "io.machinekit.machinekit-hal.description=Machinekit-HAL " + f"{self.armed_os_name.capitalize()} {self.armed_os_codename.capitalize()} " + f"Docker image for {self.armed_image_architecture} architecture.", + "--label", f"io.machinekit.machinekit-hal.build-date={datetime.datetime.now().strftime(' % Y-%m-%dT % H: % M: % SZ')}", + "--label", f"io.machinekit.machinekit-hal.vcs-ref={self.git_sha}", + "--label", f"io.machinekit.machinekit-hal.vcs-branch={self.git_branch}", + "--label", f"io.machinekit.machinekit-hal.vcs-url={self.git_remote_url}" ] docker_parameters = [ - "--file", "{0}/scripts/containers/buildsystem/debian/Dockerfile".format( - self.normalized_path), - "--tag", "{0}:latest".format(docker_tag)] + "--file", f"{self.normalized_path}/debian/buildsystem/Dockerfile", + "--tag", f"{docker_tag}:latest"] if target is not None: - docker_parameters.append(["--target", target]) + docker_parameters.extend(["--target", target]) + if network is not None: + docker_parameters.extend(["--network", network]) argument_list = docker_build_arguments + docker_labels + docker_parameters print("Docker args: docker build", " ".join(argument_list)) @@ -163,12 +166,14 @@ def main(args): buildcontainerimage_script.load_debian_distro_settings() if not buildcontainerimage_script.can_the_combination_be_build( args.distribution, args.version, args.architecture): - raise ValueError("Wanted combination of {0} {1} {2} is not possible to be build.".format( - args.distribution, args.version, args.architecture)) + raise ValueError( + f"Wanted combination of {args.distribution} {args.version} " + f"{args.architecture} is not possible to be build.") buildcontainerimage_script.build_docker_image( args.target[0] if args.target is not None else None, args.designation, - args.target[1] if args.target is not None else None) + args.target[1] if args.target is not None else None, + args.network if args.target is not None else None) print("Container image build ran successfully to completion!") except ValueError as e: print(e) @@ -216,6 +221,12 @@ def main(args): action="store", dest="designation", help="Prefix to use when tagging the image") + # Optional argument for a Docker image tag prefix + parser.add_argument("-n", + "--network", + action="store", + dest="network", + help="Networking option passed to Docker build process") args = parser.parse_args() diff --git a/debian/buildpackages.py b/debian/buildpackages.py index 1e786b7237..c5a19c5b41 100755 --- a/debian/buildpackages.py +++ b/debian/buildpackages.py @@ -45,7 +45,7 @@ import importlib.util spec = importlib.util.spec_from_file_location( "machinekit_hal_script_helpers", - "{0}/scripts/machinekit_hal_script_helpers.py".format( + "{0}/support/python/machinekit_hal_script_helpers.py".format( os.path.realpath( "{0}/..".format(os.path.dirname(os.path.abspath(__file__))) ))) diff --git a/rename_build_workflow/containers/buildsystem/debian/Dockerfile b/debian/buildsystem/Dockerfile similarity index 68% rename from rename_build_workflow/containers/buildsystem/debian/Dockerfile rename to debian/buildsystem/Dockerfile index 94a0e0a287..5f2be22c48 100644 --- a/rename_build_workflow/containers/buildsystem/debian/Dockerfile +++ b/debian/buildsystem/Dockerfile @@ -5,7 +5,7 @@ # used for building, testing and running Machinekit-HAL in CI/CD # workflows. # -# Copyright (C) 2020 Jakub Fišer +# Copyright (C) 2020 - Jakub Fišer # # based on original Docker mk-cross-builder images by: # @@ -84,7 +84,7 @@ RUN apt-get update && \ machinekit-fixuid && \ apt-get clean -COPY scripts/buildsystem/debian/base-entrypoint.sh /opt/bin/base-entrypoint.sh +COPY debian/buildsystem/base-entrypoint.sh /opt/bin/base-entrypoint.sh RUN chmod +x /opt/bin/base-entrypoint.sh && \ mkdir /opt/environment && \ @@ -103,9 +103,19 @@ RUN apt-get update && \ build-essential \ fakeroot \ devscripts \ - equivs && \ + equivs \ + ninja-build \ + jq && \ apt-get clean; +# Kitware is publishing pre-built binaries only for amd64 and arm64 architectures! +RUN curl -1vLf \ + $(curl -s https://api.github.com/repos/kitware/cmake/releases/latest | \ + jq -r --arg FILE "cmake-\d{1,}\.\d{1,}\.\d{1,}(-.{1,})?-linux-$(dpkg-architecture -qDEB_BUILD_GNU_CPU)\.sh" \ + '.assets | .[] | select(.name? | match($FILE)) | .browser_download_url') \ + --output /tmp/cmake.sh && \ + bash /tmp/cmake.sh --skip-license --prefix=/usr/local + ###################################################################### FROM machinekit-hal_builder_base AS machinekit-hal_builder @@ -113,7 +123,7 @@ FROM machinekit-hal_builder_base AS machinekit-hal_builder ARG HOST_ARCHITECTURE # This could be squashed into one layer, but it would require using BuildKit -COPY scripts/buildsystem/debian/doctor-multiarch-apt-repositories.sh \ +COPY debian/buildsystem/doctor-multiarch-apt-repositories.sh \ /doctor-multiarch-apt-repositories.sh RUN bash /doctor-multiarch-apt-repositories.sh -a ${HOST_ARCHITECTURE} && \ apt-get update && \ @@ -125,41 +135,6 @@ RUN if ! dpkg-architecture -e${HOST_ARCHITECTURE}; \ apt-get update; \ fi -# Non-standard exception, using the non-standard crossbuild-essential-i386:amd64 -# package in Machinekit/Machinekit Cloudsmith repository -RUN if [[ "$(dpkg --print-architecture)" == "amd64" && \ - "$HOST_ARCHITECTURE" == "i386" && \ - "$(lsb_release -cs)" == "stretch" ]]; \ - then \ - apt-get install -y \ - gcc-multilib \ - g++-multilib && \ - apt-get clean && \ - ln -s x86_64-linux-gnu-objcopy /usr/bin/i686-linux-gnu-objcopy && \ - ln -s x86_64-linux-gnu-objdump /usr/bin/i686-linux-gnu-objdump && \ - ln -s x86_64-linux-gnu-strip /usr/bin/i686-linux-gnu-strip; \ - fi - -RUN if [[ "$(dpkg --print-architecture)" == "amd64" && \ - "$HOST_ARCHITECTURE" == "i386" && \ - "$(lsb_release -cs)" == "stretch" ]]; \ - then \ - printf "%b" \ - "#!/bin/bash\n" \ - "export CC=\"gcc -m32\"\n" \ - "export CXX=\"g++ -m32\"\n" \ - "export LDEMULATION=\"elf_i386\"\n" \ - > /opt/environment/compiler.sh; \ - else \ - printf "%b" \ - "#!/bin/bash\n" \ - "export CC=$(dpkg-architecture -a${HOST_ARCHITECTURE} \ - -qDEB_HOST_GNU_TYPE)-gcc\n" \ - "export CXX=$(dpkg-architecture -a${HOST_ARCHITECTURE} \ - -qDEB_HOST_GNU_TYPE)-g++\n" \ - > /opt/environment/compiler.sh; \ - fi - RUN printf "%b" \ "#!/bin/bash\n" \ "set -a\n" \ @@ -177,6 +152,7 @@ RUN cd /tmp && \ "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" \ ./debian/control -# Package builds fail on warnings -RUN echo -e "#!/bin/bash\nexport DPKG_CFLAGS+=' -Werror'\n" \ - > /opt/environment/dpkg_flags.sh +# This is a clutch +RUN pip3 install --upgrade \ + pip \ + build; diff --git a/rename_build_workflow/buildsystem/debian/README.md b/debian/buildsystem/README.md similarity index 100% rename from rename_build_workflow/buildsystem/debian/README.md rename to debian/buildsystem/README.md diff --git a/rename_build_workflow/buildsystem/debian/base-entrypoint.sh b/debian/buildsystem/base-entrypoint.sh similarity index 100% rename from rename_build_workflow/buildsystem/debian/base-entrypoint.sh rename to debian/buildsystem/base-entrypoint.sh diff --git a/rename_build_workflow/debian-distro-settings.json b/debian/buildsystem/debian-distro-settings.json similarity index 81% rename from rename_build_workflow/debian-distro-settings.json rename to debian/buildsystem/debian-distro-settings.json index 569efdb641..e57e6c42ca 100644 --- a/rename_build_workflow/debian-distro-settings.json +++ b/debian/buildsystem/debian-distro-settings.json @@ -1,11 +1,5 @@ { "osVersions": [ - { - "distributionID": "Debian", - "distributionCodename": "Stretch", - "baseImage": "debian:stretch", - "releaseNumber": 9 - }, { "distributionID": "Debian", "distributionCodename": "Buster", @@ -38,10 +32,6 @@ } ], "allowedCombinations": [ - { - "osVersionNumber": 9, - "architecture": "i386" - }, { "osVersionNumber": 18.04, "architecture": "i386" @@ -50,10 +40,6 @@ "osVersionNumber": 10, "architecture": "i386" }, - { - "osVersionNumber": 9, - "architecture": "amd64" - }, { "osVersionNumber": 18.04, "architecture": "amd64" @@ -70,10 +56,6 @@ "osVersionNumber": 21.04, "architecture": "amd64" }, - { - "osVersionNumber": 9, - "architecture": "armhf" - }, { "osVersionNumber": 18.04, "architecture": "armhf" @@ -90,10 +72,6 @@ "osVersionNumber": 21.04, "architecture": "armhf" }, - { - "osVersionNumber": 9, - "architecture": "arm64" - }, { "osVersionNumber": 18.04, "architecture": "arm64" diff --git a/rename_build_workflow/buildsystem/debian/doctor-multiarch-apt-repositories.sh b/debian/buildsystem/doctor-multiarch-apt-repositories.sh similarity index 100% rename from rename_build_workflow/buildsystem/debian/doctor-multiarch-apt-repositories.sh rename to debian/buildsystem/doctor-multiarch-apt-repositories.sh diff --git a/debian/control.in b/debian/control.in index 2164cf1113..f9629344ad 100644 --- a/debian/control.in +++ b/debian/control.in @@ -49,6 +49,8 @@ Build-Depends: yapps2:native, python3-yapps:native, python3-pyftpdlib:native, + python3-pip:native, + python3-venv:native, libck-dev @BUILDTIME_DEPENDENCIES@ Standards-Version: 2.1.0 diff --git a/debian/debianMultiarchToolchain.cmake b/debian/debianMultiarchToolchain.cmake new file mode 100644 index 0000000000..6101a07827 --- /dev/null +++ b/debian/debianMultiarchToolchain.cmake @@ -0,0 +1,87 @@ +# ~~~ +# #################################################################### +# Description: debianToolchain.cmake +# +# This file, 'debianToolchain.cmake', implements an universal +# CMake toolchain file for building Machinekit-HAL suite for +# all supported architectures on Debian-based operating systems. +# +# This process presumes that the environment variables include +# all items from 'dpkg-architecture' output. This means it is either +# running as part of the 'dpkg-buildpackage' workflow, or the +# process just have the variables manually exported to 'environ'. +# +# Copyright (C) 2021 Jakub Fišer +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# #################################################################### +# ~~~ + +if(DEFINED ENV{DEB_BUILD_GNU_TYPE} + AND DEFINED ENV{DEB_HOST_GNU_TYPE} + AND DEFINED ENV{DEB_HOST_ARCH_CPU} + AND DEFINED ENV{DEB_HOST_ARCH_OS}) + + if(NOT "$ENV{DEB_BUILD_GNU_TYPE}" STREQUAL "$ENV{DEB_HOST_GNU_TYPE}") + # CMake known value required, i.e. 'Linux' with capital 'L' + set(CMAKE_SYSTEM_NAME "Linux") + set(CMAKE_SYSTEM_PROCESSOR "$ENV{DEB_HOST_ARCH_CPU}") + set(CMAKE_LIBRARY_ARCHITECTURE "$ENV{DEB_HOST_GNU_TYPE}") + endif() + + # Try to find the HOST GCC compiler in the ${PATH}, fail quickly if the tool + # cannot be found + find_program(_toolchain_gcc_compiler "$ENV{DEB_HOST_GNU_TYPE}-gcc" REQUIRED) + # Try to find the HOST G++ compiler in the ${PATH}, fail quickly if the tool + # cannot be found + find_program(_toolchain_gplusplus_compiler "$ENV{DEB_HOST_GNU_TYPE}-g++" + REQUIRED) + # Try to find the HOST Pkg-Config in the ${PATH}, do not fail if the tool + # cannot be found, as the BUILD one can be used with setting the right + # environment variable to the root of '.pc' files in HOST libraries directory + find_program(_toolchain_dpkg_cross_pkg_config + "$ENV{DEB_HOST_GNU_TYPE}-pkg-config") + + # Populate the CMake variables with the full paths of the previously found + # compilers, this works around some specific CMake issues + set(CMAKE_C_COMPILER "${_toolchain_gcc_compiler}") + set(CMAKE_CXX_COMPILER "${_toolchain_gplusplus_compiler}") + + # This is true only and always the CMAKE_SYSTEM_NAME variable was set either + # in this toolchain file or on the command line when the CMake + # configuration/generation is requested + if(CMAKE_CROSSCOMPILING) + set(ONLY_CMAKE_FIND_ROOT_PATH TRUE) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + + # Prepend the architecture specific include directories to the compiler + # search path + include_directories(BEFORE "/usr/$ENV{DEB_HOST_GNU_TYPE}/include" + "/usr/include/$ENV{DEB_HOST_GNU_TYPE}") + + # Use the HOST architecture specific DPKG-Config and fall back if one doe + # not exist + if(EXISTS "${_toolchain_dpkg_cross_pkg_config}") + set(PKG_CONFIG_EXECUTABLE "${_toolchain_dpkg_cross_pkg_config}") + else() + set(ENV{PKG_CONFIG_LIBDIR} + "/usr/lib/$ENV{DEB_HOST_GNU_TYPE}/pkgconfig:/usr/share/pkgconfig") + endif() + endif() +endif() diff --git a/debian/machinekit-hal.postinst b/debian/machinekit-hal.postinst.in similarity index 100% rename from debian/machinekit-hal.postinst rename to debian/machinekit-hal.postinst.in diff --git a/debian/ripruntests.py b/debian/ripruntests.py deleted file mode 100755 index 255dd8c64c..0000000000 --- a/debian/ripruntests.py +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -##################################################################### -# Description: ripruntests.py -# -# This file, 'ripruntests.py', runs Machinekit-HAL's -# runtests script -# -# Copyright (C) 2020 Jakub Fišer -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -###################################################################### - -""" -Script for running Machinekit-HAL runtests -""" - -# Debian 9 Stretch, Ubuntu 18.04 Bionic and (probably) other older distributions -# need in environment LANG=C.UTF-8 (or other similar specification of encoding) -# to properly function - -__license__ = "LGPL 2.1" - -import argparse -import sh -import os -import sys - -import importlib.util -spec = importlib.util.spec_from_file_location( - "machinekit_hal_script_helpers", - "{0}/scripts/machinekit_hal_script_helpers.py".format( - os.path.realpath( - "{0}/..".format(os.path.dirname(os.path.abspath(__file__))) - ))) -helpers = importlib.util.module_from_spec(spec) -spec.loader.exec_module(helpers) - - -class Ripruntests_script(): - def __init__(self: object, path): - self.normalized_path = helpers.NormalizeMachinekitHALPath(path)() - - def disable_zeroconf(self: object) -> None: - rip_ini_file = "{0}/etc/machinekit/machinekit.ini".format( - self.normalized_path) - new_ini_items = "ANNOUNCE_IPV4=0\nANNOUNCE_IPV6=0\n" - with open(rip_ini_file, "a") as writer: - writer.write(new_ini_items) - - @property - def rip_environment_path(self): - return "{0}/scripts/rip-environment".format( - self.normalized_path) - - - def run_runtests(self: object, test_path) -> None: - if test_path is None: - test_path = "{0}/tests".format(self.normalized_path) - bash_command_string = ". {0}; runtests {1}".format( - self.rip_environment_path, test_path) - sh.bash("-c", bash_command_string, - _cwd=self.normalized_path, _out=sys.stdout.buffer, _err=sys.stderr.buffer) - - def run_python_tests(self: object) -> None: - bash_command_string = ". {0}; ./nosetests/runpytest.sh".format( - self.rip_environment_path) - sh.bash("-c", bash_command_string, - _cwd=self.normalized_path, - _out=sys.stdout.buffer, - _err=sys.stderr.buffer) - - def build_rip(self: object) -> None: - src_directory = "{0}/src".format(self.normalized_path) - number_of_cores_string = sh.nproc(_tty_out=False).strip() - autogen_path = "{0}/autogen.sh".format(src_directory) - sh.Command(autogen_path)(_cwd=src_directory, _out=sys.stdout.buffer) - configure_path = "{0}/configure".format(src_directory) - sh.Command(configure_path)(_cwd=src_directory, _out=sys.stdout.buffer) - sh.make("-j", number_of_cores_string, - _cwd=src_directory, _out=sys.stdout.buffer) - sh.sudo("-S", "make", "setuid", _in=self.sudo_password, - _cwd=src_directory, _out=sys.stdout.buffer) - - def test_for_sudo(self: object) -> bool: - try: - sh.dpkg_query("-W", "sudo", _tty_out=False) - return True - except: - return False - - def am_i_root(self: object) -> bool: - uid = os.getuid() - if uid in [0]: - return True - return False - - def test_sudo_rights(self: object, sudo_password) -> bool: - # Test for sudo rights if some password was specified - try: - sh.sudo("-S", "true", _in=sudo_password) - self.sudo_password = sudo_password - return True - except: - return False - - -def main(args): - """ Main entry point of the app """ - try: - ripruntests_script = Ripruntests_script(args.path) - if ripruntests_script.am_i_root(): - raise ValueError( - "This script cannot be run under the 'root' user.") - if not ripruntests_script.test_for_sudo(): - raise ValueError( - "The 'sudo' executable has to be installed.") - if not ripruntests_script.test_sudo_rights(args.sudo_password): - raise ValueError( - "The user has to be able to use 'sudo'.") - - if not args.no_build: - ripruntests_script.build_rip() - if not (args.no_runtests or args.no_python_tests): - ripruntests_script.disable_zeroconf() - if not args.no_runtests: - ripruntests_script.run_runtests(args.test_path) - if not args.no_python_tests: - ripruntests_script.run_python_tests() - print("Machinekit-HAL regression tests ran successfully!") - except ValueError as e: - print(e) - sys.exit(1) - - -if __name__ == "__main__": - """ This is executed when run from the command line """ - parser = argparse.ArgumentParser( - description="Build Machinekit-HAL RIP version and run Runtests on it") - - # Optional argument for path to Machinekit-HAL repository - parser.add_argument("-p", - "--path", - action=helpers.PathExistsAction, - dest="path", - default=os.getcwd(), - help="Path to root of Machinekit-HAL repository") - # Optional argument for Debian host architecture - parser.add_argument("-t", - "--tests-path", - dest="test_path", - action=helpers.PathExistsAction, - metavar="PATH", - help="Path with test definitions.") - - parser.add_argument("-s", - "--sudo-password", - dest="sudo_password", - action="store", - metavar="PASSWORD", - help="Password for usage with sudo command.") - - parser.add_argument("--no-build", - action="store_true", - help="Do not build") - - parser.add_argument("--no-runtests", - action="store_true", - help="Do not run 'runtests'") - - parser.add_argument("--no-python-tests", - action="store_true", - help="Do not run python tests") - - args = parser.parse_args() - - main(args) diff --git a/debian/runtests.py b/debian/runtests.py new file mode 100755 index 0000000000..a8cb4f55e6 --- /dev/null +++ b/debian/runtests.py @@ -0,0 +1,356 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +##################################################################### +# Description: runtests.py +# +# This file, 'runtests.py', runs Machinekit-HAL's +# runtests script +# +# Copyright (C) 2020 - Jakub Fišer +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +###################################################################### + +""" +Script for running Machinekit-HAL runtests +""" + +# Debian 9 Stretch, Ubuntu 18.04 Bionic and (probably) other older distributions +# need in environment LANG=C.UTF-8 (or other similar specification of encoding) +# to properly function + +__license__ = "LGPL 2.1" + +import argparse +import sh +import os +import sys +import stat +import shutil +import pathlib +import tempfile +from typing import Union, List + +import importlib.util +spec = importlib.util.spec_from_file_location( + "machinekit_hal_script_helpers", + "{0}/support/python/machinekit_hal_script_helpers.py".format( + os.path.realpath( + "{0}/..".format(os.path.dirname(os.path.abspath(__file__))) + ))) +helpers = importlib.util.module_from_spec(spec) +spec.loader.exec_module(helpers) + +# TODO: Clean this up! + + +class Build(): + Generators = { + "Unix Makefiles": ["make", "M", "unix"], + "Ninja Multi-Config": ["Ninja", "N", "Ninja Multi-Config"], + } + Configs = [ + "Debug", + "Release", + "RelWithDebInfo", + ] + + def __init__(self, + source_directory: Union[str, pathlib.Path], + build_directory: Union[str, pathlib.Path], + generator: str, + configs: Union[List[str], str]): + if not isinstance(source_directory, pathlib.Path): + source_directory = pathlib.Path(source_directory) + if not isinstance(build_directory, pathlib.Path): + build_directory = pathlib.Path(build_directory) + + if generator not in Build.Generators.keys(): + raise ValueError( + f"Generator has to be one of {Build.Generators}!") + self.generator = generator + + if isinstance(configs, str): + configs = list(configs) + if not set(configs) <= set(Build.Configs): + raise ValueError( + f"Configs must be in {Build.Configs}!") + self.configs = configs + + # Possible to be run from anywhere in Machinekit-HAL's repository tree + self.source_directory = helpers.NormalizeMachinekitHALPath( + source_directory)() + + self.build_directory = build_directory + + if not self.build_directory.is_absolute(): + self.build_directory = self.build_directory.resolve() + if not self.build_directory.is_dir(): + self.build_directory.mkdir() # Throws in case Path is another object + + def disable_zeroconf(self) -> None: + ini_files = [] + + ini_postfix = "etc/machinekit/hal/machinekit.ini" + if self.generator == "Ninja Multi-Config": + for prefix in self.configs: + ini_files.append(self.build_directory / prefix / ini_postfix) + elif self.generator == "Unix Makefiles": + ini_files.append(self.build_directory / ini_postfix) + + new_ini_items = "ANNOUNCE_IPV4=0\nANNOUNCE_IPV6=0\n" + + for ini_file in ini_files: + ini_file.chmod(stat.S_IWUSR | stat.S_IRUSR) + with open(ini_file, "a") as writer: + writer.write(new_ini_items) + + def _envrc_path(self, config: str) -> pathlib.Path: + if not config or config not in self.configs: + raise ValueError("Config for which .envrc is required must be of " + f"previously configured: {self.configs}") + if self.generator == "Ninja Multi-Config": + return self.build_directory / config / ".envrc" + else: + return self.build_directory / ".envrc" + + def _prepare_run_runtests_executable(self, new_path: pathlib.Path) -> pathlib.Path: + run_runtests = self.source_directory / "tests" / "run_runtests" + new_run_runtests = new_path / "run_runtests" + shutil.copyfile(run_runtests, new_run_runtests) + new_run_runtests.chmod(stat.S_IWUSR | stat.S_IRUSR | stat.S_IXUSR) + return new_run_runtests + + def run_runtests(self, test_path: pathlib.Path = None) -> None: + if test_path is None: + test_path = self.source_directory / "tests" / "runtests" + else: + test_path = test_path if isinstance( + test_path, pathlib.Path) else pathlib.Path(test_path) + for config in self.configs: + test_directory = pathlib.Path(tempfile.mkdtemp(suffix=config)) + destination = test_directory / "runtests" + print( + f"--->Tests for config {config} are run in directory {destination}.<---" + "\n====================================") + shutil.copytree(test_path, destination, ignore=shutil.ignore_patterns( + 'pipe-*', 'result', 'strerr')) + run_runtests = self._prepare_run_runtests_executable( + test_directory) + bash_command_string = f". {self._envrc_path(config)}; {run_runtests} {destination}" + sh.bash("-c", bash_command_string, + _out=sys.stdout.buffer, _err=sys.stderr.buffer) + + # def run_python_tests(self: object) -> None: + # bash_command_string = ". {0}; ./nosetests/runpytest.sh".format( + # self.rip_environment_path) + # sh.bash("-c", bash_command_string, + # _cwd=self.normalized_path, + # _out=sys.stdout.buffer, + # _err=sys.stderr.buffer) + + def configure(self, + cache: dict = dict()) -> None: + toolchain_file = self.source_directory / \ + "debian" / "debianMultiarchToolchain.cmake" + if "CMAKE_TOOLCHAIN_FILE" not in cache: + cache.update(dict(CMAKE_TOOLCHAIN_FILE=toolchain_file)) + cache_list = [f"-D{key}={value}" for key, + value in cache.items()] + + sh.cmake("-S", self.source_directory, + "-B", self.build_directory, + "-G", self.generator, + *cache_list, + _out=sys.stdout.buffer) + + def build(self, + target: str = None) -> None: + number_of_cores_string = sh.nproc(_tty_out=False).strip() + + build_additional = list() + if target is not None: + build_additional.append(["--target", target]) + + for config in self.configs: + sh.cmake("--build", self.build_directory, + "-j", number_of_cores_string, + "--verbose", + "--config", config, + *build_additional, + _out=sys.stdout.buffer) + + # sh.Command(autogen_path)(_cwd=src_directory, _out=sys.stdout.buffer) + # configure_path = "{0}/configure".format(src_directory) + # sh.Command(configure_path)(_cwd=src_directory, _out=sys.stdout.buffer) + # sh.make("-j", number_of_cores_string, + # _cwd=src_directory, _out=sys.stdout.buffer) + # sh.sudo("-S", "make", "setuid", _in=self.sudo_password, + # _cwd=src_directory, _out=sys.stdout.buffer) + + def test_for_sudo(self: object) -> bool: + try: + sh.dpkg_query("-W", "sudo", _tty_out=False) + return True + except Exception: + return False + + def am_i_root(self: object) -> bool: + uid = os.getuid() + if uid in [0]: + return True + return False + + def test_sudo_rights(self: object, sudo_password) -> bool: + # Test for sudo rights if some password was specified + try: + sh.sudo("-S", "true", _in=sudo_password) + self.sudo_password = sudo_password + return True + except Exception: + return False + + +def main(args): + """ Main entry point of the app """ + try: + build_script = Build( + args.source_path, + args.build_path if args.build_path else f"{args.source_path}/build", + args.generator, + args.configs) + if build_script.am_i_root(): + raise ValueError( + "This script cannot be run under the 'root' user.") + if not build_script.test_for_sudo(): + raise ValueError( + "The 'sudo' executable has to be installed.") + if not build_script.test_sudo_rights(args.sudo_password): + raise ValueError( + "The user has to be able to use 'sudo'.") + + if not args.no_configure: + build_script.configure() + if not args.no_build: + build_script.build() + if not (args.no_runtests): # or args.no_python_tests): + build_script.disable_zeroconf() + if not args.no_runtests: + build_script.run_runtests(args.test_path) + # if not args.no_python_tests: + # build_script.run_python_tests() + print("Machinekit-HAL regression tests ran successfully!") + except ValueError as e: + print(e) + sys.exit(1) + + +class SelectGeneratorAction(argparse.Action): + def normalize_generator(self, value: str) -> str: + for key, values in Build.Generators.items(): + for alias in values: + if alias == value: + return key + raise argparse.ArgumentError( + self, f"Generator {value} is not valid value!") + + def __call__(self, parser, namespace, values, option_string=None): + if type(values) == list: + raise argparse.ArgumentError( + self, "Only one generator can be specified!") + + generator = self.normalize_generator(values) + + setattr(namespace, self.dest, generator) + + +if __name__ == "__main__": + """ This is executed when run from the command line """ + parser = argparse.ArgumentParser( + description="Build Machinekit-HAL and run Runtests on it") + + # Optional argument for path to Machinekit-HAL repository + parser.add_argument("-p", + "--source-path", + action=helpers.PathExistsAction, + dest="source_path", + default=os.getcwd(), + metavar="PATH", + help="Path to root of Machinekit-HAL repository") + + # Optional argument for Debian host architecture + parser.add_argument("-b", + "--build-path", + action="store", + dest="build_path", + default=None, + metavar="PATH", + help="Path to the build tree of Machinekit-HAL") + + parser.add_argument("-g", + "--generator", + action=SelectGeneratorAction, + dest="generator", + choices=[alias for aliases in Build.Generators.values() + for alias in aliases], + default=list(Build.Generators.keys())[0], + metavar="GENERATOR", + help="Generator for which create the build files") + + parser.add_argument("-c", + "--config", + action="store", + dest="configs", + nargs="+", + choices=Build.Configs, + default=[Build.Configs[0]], + metavar="CONFIG", + help="Generator for which create the build files") + + parser.add_argument("-t", + "--tests-path", + dest="test_path", + action=helpers.PathExistsAction, + metavar="PATH", + help="Path with test definitions.") + + parser.add_argument("-s", + "--sudo-password", + dest="sudo_password", + action="store", + metavar="PASSWORD", + help="Password for usage with sudo command.") + + parser.add_argument("--no-configure", + action="store_true", + help="Do not configure and generate the CMake buildsystem") + + parser.add_argument("--no-build", + action="store_true", + help="Do not build") + + parser.add_argument("--no-runtests", + action="store_true", + help="Do not run 'runtests'") + + # parser.add_argument("--no-python-tests", + # action="store_true", + # help="Do not run python tests") + + args = parser.parse_args() + + main(args) diff --git a/src/executables/CMakeLists.txt b/src/executables/CMakeLists.txt index 793ba0871e..8ccef1d545 100644 --- a/src/executables/CMakeLists.txt +++ b/src/executables/CMakeLists.txt @@ -50,7 +50,6 @@ add_subdirectory(rawread) add_subdirectory(realtime) add_subdirectory(rtapi_app) add_subdirectory(rtprintf) -add_subdirectory(script_helpers) add_subdirectory(sizes) add_subdirectory(test_rtapi_vsnprinf) add_subdirectory(unionread) diff --git a/src/executables/msgd/CMakeLists.txt b/src/executables/msgd/CMakeLists.txt index 328ff79dc2..4006d6a55c 100644 --- a/src/executables/msgd/CMakeLists.txt +++ b/src/executables/msgd/CMakeLists.txt @@ -36,8 +36,8 @@ if(BUILD_MSGD_EXECUTABLE) pkg_check_modules(UUID "uuid" REQUIRED IMPORTED_TARGET) pkg_check_modules(LIBZMQ "libzmq" REQUIRED IMPORTED_TARGET) - find_library(LIBATOMIC NAMES "atomic" "libatomic.so.1" REQUIRED) - find_library(LIBRT NAMES "rt" REQUIRED) + find_library(LIBATOMIC NAMES "atomic" "libatomic" "libatomic.so" "libatomic.so.1" REQUIRED) + find_library(LIBRT NAMES "rt" "librt" "librt.so" REQUIRED) target_link_libraries( msgd diff --git a/src/executables/rtapi_app/include/rtapi_app_module.hh b/src/executables/rtapi_app/include/rtapi_app_module.hh index 33f4631a47..026c2c395a 100644 --- a/src/executables/rtapi_app/include/rtapi_app_module.hh +++ b/src/executables/rtapi_app/include/rtapi_app_module.hh @@ -80,7 +80,9 @@ int Module::load(string module) } } // Otherwise load it with dlopen()'s logic (or fail) - if (!handle) handle = dlopen(dlpath.c_str(), RTLD_GLOBAL | RTLD_NOW); + if (!handle) { + handle = dlopen(dlpath.c_str(), RTLD_GLOBAL | RTLD_NOW); + } if (!handle) { errmsg = dlerror(); rtapi_print_msg(RTAPI_MSG_ERR, "load(%s): %s", module.c_str(), errmsg); @@ -96,20 +98,24 @@ string Module::path() { if (!handle) { rtapi_print_msg(RTAPI_MSG_ERR, - "Trying to get path of non-loaded module %s\n", name.c_str()); + "Trying to get path of non-loaded module %s\n", + name.c_str()); return ""; } - + struct link_map *map; dlinfo(handle, RTLD_DI_LINKMAP, &map); - if(!map){ - rtapi_print_msg(RTAPI_MSG_ERR, "dlinfo(%s, %s): %s", name.c_str(), "RTLD_DI_LINKMAP", dlerror()); + if (!map) { + rtapi_print_msg(RTAPI_MSG_ERR, "dlinfo(%s, %s): %s", name.c_str(), + "RTLD_DI_LINKMAP", dlerror()); return NULL; } - // Should not happen, however passing nullptr to constructor of std::string is undefined - if(map->l_name == nullptr){ - rtapi_print_msg(RTAPI_MSG_ERR, "link_map->l_name for %s is nullptr!", name); + // Should not happen, however passing nullptr to constructor of std::string + // is undefined + if (map->l_name == nullptr) { + rtapi_print_msg(RTAPI_MSG_ERR, "link_map->l_name for %s is nullptr!", + name.c_str()); return NULL; } return std::string(map->l_name); @@ -125,7 +131,8 @@ template T Module::sym(const char *sym_name) { if (!handle) { rtapi_print_msg(RTAPI_MSG_ERR, - "Trying to sym symbol on non-loaded module %s\n", name.c_str()); + "Trying to sym symbol on non-loaded module %s\n", + name.c_str()); return nullptr; } clear_err(); diff --git a/src/libraries/CMakeLists.txt b/src/libraries/CMakeLists.txt index f7d2e21de8..0e68d01f1f 100644 --- a/src/libraries/CMakeLists.txt +++ b/src/libraries/CMakeLists.txt @@ -61,6 +61,7 @@ add_subdirectory(rtapi_support) add_subdirectory(runtime) add_subdirectory(runtime_math) add_subdirectory(runtime_memory) +add_subdirectory(samstr_memdefs) add_subdirectory(service) add_subdirectory(service_discovery) add_subdirectory(syslog_async) diff --git a/src/libraries/hal/CMakeLists.txt b/src/libraries/hal/CMakeLists.txt index d2a0ac9c46..d291ef0769 100644 --- a/src/libraries/hal/CMakeLists.txt +++ b/src/libraries/hal/CMakeLists.txt @@ -55,6 +55,8 @@ if(BUILD_HAL_LIBRARY) src/hal_accessor.c src/hal_iring.c) + set(HALPB_SOURCE_FILES src/halpb.cc) + set(HEADER_FILES include/hal.h) target_include_directories( @@ -62,13 +64,13 @@ if(BUILD_HAL_LIBRARY) INTERFACE $ $ #include #include -#include "message.pb.h" +#include "machinetalk/protobuf/message.pb.h" // in halpb.cc: int halpr_describe_signal(hal_sig_t *sig, machinetalk::Signal *pbsig); diff --git a/src/libraries/nanopb/CMakeLists.txt b/src/libraries/nanopb/CMakeLists.txt index 9309158303..b8c481ce3b 100644 --- a/src/libraries/nanopb/CMakeLists.txt +++ b/src/libraries/nanopb/CMakeLists.txt @@ -32,7 +32,7 @@ set(NANOPB_CHECKOUT_REF CACHE STRING "Ref of upstream Nanopb repository to check out.") include(FetchContent) -include("${PROJECT_SOURCE_DIR}/cmake/tools/FindProtobuf.cmake") +include("${PROJECT_SOURCE_DIR}/support/cmake/tools/FindProtobuf.cmake") # Both FETCHCONTENT_QUIET and GIT_PROGRESS need to be set to show progress # status during configuring state @@ -56,7 +56,7 @@ FetchContent_MakeAvailable(nanopb) configure_file(${nanopb_SOURCE_DIR}/generator/proto/nanopb.proto ${CMAKE_CURRENT_BINARY_DIR}/nanopb.proto COPYONLY) -set(SOURCE_NANOPB_PROTO_FILE ${CMAKE_CURRENT_BINARY_DIR}/nanopb.proto) + set(SOURCE_NANOPB_PROTO_FILE ${CMAKE_CURRENT_BINARY_DIR}/nanopb.proto) # As upstream CMake implementation does not implement usable CMake targets # usable to just target_link_libraries() against, create internal ones @@ -76,7 +76,8 @@ protobuf_generate( TARGET nanopb_proto_cc PROTOS - ${SOURCE_NANOPB_PROTO_FILE}) + ${SOURCE_NANOPB_PROTO_FILE} + APPEND_PATH) target_include_directories(nanopb_interface INTERFACE ${nanopb_SOURCE_DIR} )# TODO: Add both install and build INTERFACEs diff --git a/src/libraries/proto/CMakeLists.txt b/src/libraries/proto/CMakeLists.txt index b215e13aaf..bdc11bd46d 100644 --- a/src/libraries/proto/CMakeLists.txt +++ b/src/libraries/proto/CMakeLists.txt @@ -26,7 +26,7 @@ option(BUILD_PROTO_LIBRARY "Built the Proto library." TRUE) if(BUILD_PROTO_LIBRARY) - include("${PROJECT_SOURCE_DIR}/cmake/tools/FindProtobuf.cmake") + include("${PROJECT_SOURCE_DIR}/support/cmake/tools/FindProtobuf.cmake") add_library(machinetalk_proto_c SHARED) add_library(${MACHINEKIT_HAL_NAMESPACE}::machinetalk_proto_c ALIAS diff --git a/src/libraries/rtapi_compat/src/rtapi_compat.c b/src/libraries/rtapi_compat/src/rtapi_compat.c index 4b72fbc22e..0628b0e4da 100644 --- a/src/libraries/rtapi_compat/src/rtapi_compat.c +++ b/src/libraries/rtapi_compat/src/rtapi_compat.c @@ -321,7 +321,9 @@ int rtapi_get_tags(const char *mod_name) strerror_r(errno, errmsg, 200)); return -1; } - strcat(modpath,"/modules/"); + // TODO: This is a terrible way how to do this, rework it to use the set of loaded modules + // and dlinfo querying! (Like the rtapi_app_module.hh is doing.) + strcat(modpath,"/mod"); strcat(modpath,mod_name); strcat(modpath, ".so"); diff --git a/src/libraries/runtime/CMakeLists.txt b/src/libraries/runtime/CMakeLists.txt index 10d60a8e39..85e9b1bb51 100644 --- a/src/libraries/runtime/CMakeLists.txt +++ b/src/libraries/runtime/CMakeLists.txt @@ -166,7 +166,7 @@ if(BUILD_RUNTIME_LIBRARY) set(RTAPI_INI_RTAPI_APP_EXECUTABLE "$") set(RTAPI_INI_HAL_HOME "${MACHINEKIT_HAL_ARTIFACTS_MOUNTPOINT_DIRECTORY}") set(RTAPI_INI_RTAPI_RTLIB_DIR - "${MACHINEKIT_HAL_ARTIFACTS_MOUNTPOINT_DIRECTORY}/${CMAKE_INSTALL_LIBDIR}/${MACHINEKIT_HAL_PACKAGE_PREFIX_PATH}" + "${MACHINEKIT_HAL_ARTIFACTS_MOUNTPOINT_DIRECTORY}/${CMAKE_INSTALL_LIBDIR}/${MACHINEKIT_HAL_PACKAGE_PREFIX_PATH}/module/managed" ) set(RTAPI_INI_RTAPI_LIBEXEC_DIR "${MACHINEKIT_HAL_INTERNAL_EXECUTABLE_OUTPUT_DIRECTORY}") @@ -190,7 +190,7 @@ if(BUILD_RUNTIME_LIBRARY) ) set(RTAPI_INI_HAL_HOME "${CMAKE_INSTALL_PREFIX}") # TODO: Really?? set(RTAPI_INI_RTAPI_RTLIB_DIR - "${MACHINEKIT_HAL_LIBRARY_FULL_INSTALL_DIRECTORY}/${MACHINEKIT_HAL_PACKAGE_PREFIX_PATH}" + "${MACHINEKIT_HAL_LIBRARY_FULL_INSTALL_DIRECTORY}/${MACHINEKIT_HAL_PACKAGE_PREFIX_PATH}/module/managed" ) set(RTAPI_INI_RTAPI_LIBEXEC_DIR "${MACHINEKIT_HAL_INTERNAL_EXECUTABLE_FULL_INSTALL_DIRECTORY}") diff --git a/src/libraries/runtime_memory/CMakeLists.txt b/src/libraries/runtime_memory/CMakeLists.txt index 77546ef291..d77af79cc3 100644 --- a/src/libraries/runtime_memory/CMakeLists.txt +++ b/src/libraries/runtime_memory/CMakeLists.txt @@ -39,7 +39,7 @@ if(BUILD_RUNTIME_MEMORY_LIBRARY) target_sources(runtime_memory_api PRIVATE ${SOURCE_FILES}) - find_library(LIBRT "rt" REQUIRED) + find_library(LIBRT NAMES "rt" "librt" "librt.so" "librt.so.1" REQUIRED) target_link_libraries(runtime_memory_api PRIVATE runtime_api ${LIBRT}) diff --git a/src/libraries/samstr_memdefs/CMakeLists.txt b/src/libraries/samstr_memdefs/CMakeLists.txt new file mode 100644 index 0000000000..0fd3fe9bae --- /dev/null +++ b/src/libraries/samstr_memdefs/CMakeLists.txt @@ -0,0 +1,46 @@ +# ############################################################################## +# Description: CMakeLists.txt +# +# This file, 'CMakeLists.txt', implements build system rules for Machinekit-HAL +# project +# +# Copyright (C) 2021 Jakub Fišer +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License along +# with this library; if not, write to the Free Software Foundation, Inc., 51 +# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# ############################################################################## + +option(BUILD_SAMSTR_MEMDEFS_LIBRARY "Built the SamStr MemDefs library." TRUE) + +if(BUILD_SAMSTR_MEMDEFS_LIBRARY) + add_library(samstr_memdefs INTERFACE) + + target_include_directories( + samstr_memdefs + INTERFACE $ + $) + + set_target_properties( + samstr_memdefs PROPERTIES PUBLIC_HEADER + include/samstr_memdefs/samstr_memdefs.h) + + target_link_libraries(samstr_memdefs INTERFACE runtime_api) + + install( + TARGETS samstr_memdefs + EXPORT machinekit_hal + PUBLIC_HEADER DESTINATION "${MACHINEKIT_HAL_INTERFACE_DIRECTORY}" + COMPONENT MachinekitHAL_Library_Development) +endif() diff --git a/decide_what_to_do/hal/components/streamer.h b/src/libraries/samstr_memdefs/include/samstr_memdefs/samstr_memdefs.h similarity index 97% rename from decide_what_to_do/hal/components/streamer.h rename to src/libraries/samstr_memdefs/include/samstr_memdefs/samstr_memdefs.h index a63517c463..ded3edb46f 100644 --- a/decide_what_to_do/hal/components/streamer.h +++ b/src/libraries/samstr_memdefs/include/samstr_memdefs/samstr_memdefs.h @@ -1,5 +1,5 @@ /******************************************************************** -* Description: streamer.h +* Description: samstr_memdefs.h * Typedefs and such for the "streamer" and "sampler" * HAL components. * diff --git a/src/modules/managed/components/CMakeLists.txt b/src/modules/managed/components/CMakeLists.txt index ea6fad3576..d5244622ec 100644 --- a/src/modules/managed/components/CMakeLists.txt +++ b/src/modules/managed/components/CMakeLists.txt @@ -218,6 +218,7 @@ add_subdirectory(safety_latchv2) add_subdirectory(sample_channel) add_subdirectory(sample_hold) add_subdirectory(sample_holdv2) +add_subdirectory(sampler) add_subdirectory(scale) add_subdirectory(select8) add_subdirectory(select8v2) @@ -240,6 +241,7 @@ add_subdirectory(stepgen) add_subdirectory(stepgenv2) add_subdirectory(steptest) add_subdirectory(steptestv2) +add_subdirectory(streamer) add_subdirectory(sum2) add_subdirectory(sum2v2) add_subdirectory(sumn) diff --git a/cmake/toolchain/debianArm32Toolchain.cmake b/src/modules/managed/components/sampler/CMakeLists.txt similarity index 55% rename from cmake/toolchain/debianArm32Toolchain.cmake rename to src/modules/managed/components/sampler/CMakeLists.txt index fcaac86666..daedec471d 100644 --- a/cmake/toolchain/debianArm32Toolchain.cmake +++ b/src/modules/managed/components/sampler/CMakeLists.txt @@ -21,19 +21,35 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # -# #################################################################### +# ##################################################################### # ~~~ -set(CMAKE_SYSTEM_NAME "Linux") -set(CMAKE_SYSTEM_PROCESSOR "armhf") -set(CMAKE_LIBRARY_ARCHITECTURE "arm-linux-gnueabihf") +option(BUILD_SAMPLER_MANAGED_MODULE "Built the Sampler HAL managed module." TRUE) + +if(BUILD_SAMPLER_MANAGED_MODULE) + include(MachinekitHALSymbolVisibility) + + add_library(sampler MODULE) + add_library(${MACHINEKIT_HAL_NAMESPACE}::sampler ALIAS sampler) + + set(SOURCE_FILES src/sampler.c) + + target_sources(sampler PRIVATE ${SOURCE_FILES}) + + target_link_libraries(sampler PRIVATE hal_api runtime_api samstr_memdefs) + + export_rtapi_symbols(TARGET sampler) + + target_compile_definitions(sampler PRIVATE "RTAPI") -set(ENV{PKG_CONFIG_LIBDIR} - "/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig") -set(CMAKE_C_COMPILER "arm-linux-gnueabihf-gcc") -set(CMAKE_CXX_COMPILER "arm-linux-gnueabihf-g++") + set_target_properties( + sampler + PROPERTIES PREFIX "mod" LIBRARY_OUTPUT_DIRECTORY + "${MACHINEKIT_HAL_MANAGED_MODULE_OUTPUT_DIRECTORY}") -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + install( + TARGETS sampler + EXPORT machinekit_hal_managed_module_sampler + LIBRARY DESTINATION "${MACHINEKIT_HAL_MANAGED_MODULE_DIRECTORY}" + COMPONENT MachinekitHAL_Managed_Sampler) +endif() diff --git a/decide_what_to_do/hal/components/sampler.c b/src/modules/managed/components/sampler/src/sampler.c similarity index 97% rename from decide_what_to_do/hal/components/sampler.c rename to src/modules/managed/components/sampler/src/sampler.c index 0642d6cc42..851b63addd 100644 --- a/decide_what_to_do/hal/components/sampler.c +++ b/src/modules/managed/components/sampler/src/sampler.c @@ -53,10 +53,10 @@ information, go to https://github.com/machinekit. */ -#include "rtapi.h" /* RTAPI realtime OS API */ -#include "rtapi_app.h" /* RTAPI realtime module decls */ -#include "hal.h" /* HAL public API decls */ -#include "streamer.h" /* decls and such for fifos */ +#include "rtapi.h" /* RTAPI realtime OS API */ +#include "rtapi_app.h" /* RTAPI realtime module decls */ +#include "hal.h" /* HAL public API decls */ +#include "samstr_memdefs/samstr_memdefs.h" /* decls and such for fifos */ #include "rtapi_errno.h" #include "rtapi_string.h" diff --git a/src/modules/managed/components/streamer/CMakeLists.txt b/src/modules/managed/components/streamer/CMakeLists.txt new file mode 100644 index 0000000000..e7daf86f17 --- /dev/null +++ b/src/modules/managed/components/streamer/CMakeLists.txt @@ -0,0 +1,55 @@ +# ~~~ +# #################################################################### +# Description: CMakeLists.txt +# +# This file, 'CMakeLists.txt', implements build system +# rules for Machinekit-HAL project +# +# Copyright (C) 2021 Jakub Fišer +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# ##################################################################### +# ~~~ + +option(BUILD_STREAMER_MANAGED_MODULE "Built the Streamer HAL managed module." TRUE) + +if(BUILD_STREAMER_MANAGED_MODULE) + include(MachinekitHALSymbolVisibility) + + add_library(streamer MODULE) + add_library(${MACHINEKIT_HAL_NAMESPACE}::streamer ALIAS streamer) + + set(SOURCE_FILES src/streamer.c) + + target_sources(streamer PRIVATE ${SOURCE_FILES}) + + target_link_libraries(streamer PRIVATE hal_api runtime_api samstr_memdefs) + + export_rtapi_symbols(TARGET streamer) + + target_compile_definitions(streamer PRIVATE "RTAPI") + + set_target_properties( + streamer + PROPERTIES PREFIX "mod" LIBRARY_OUTPUT_DIRECTORY + "${MACHINEKIT_HAL_MANAGED_MODULE_OUTPUT_DIRECTORY}") + + install( + TARGETS streamer + EXPORT machinekit_hal_managed_module_streamer + LIBRARY DESTINATION "${MACHINEKIT_HAL_MANAGED_MODULE_DIRECTORY}" + COMPONENT MachinekitHAL_Managed_Streamer) +endif() diff --git a/decide_what_to_do/hal/components/streamer.c b/src/modules/managed/components/streamer/src/streamer.c similarity index 97% rename from decide_what_to_do/hal/components/streamer.c rename to src/modules/managed/components/streamer/src/streamer.c index f3551ee4ef..4433e89f70 100644 --- a/decide_what_to_do/hal/components/streamer.c +++ b/src/modules/managed/components/streamer/src/streamer.c @@ -53,10 +53,10 @@ information, go to https://github.com/machinekit. */ -#include "rtapi.h" /* RTAPI realtime OS API */ -#include "rtapi_app.h" /* RTAPI realtime module decls */ -#include "hal.h" /* HAL public API decls */ -#include "streamer.h" /* decls and such for fifos */ +#include "rtapi.h" /* RTAPI realtime OS API */ +#include "rtapi_app.h" /* RTAPI realtime module decls */ +#include "hal.h" /* HAL public API decls */ +#include "samstr_memdefs/samstr_memdefs.h" /* decls and such for fifos */ #include "rtapi_errno.h" #include "rtapi_string.h" diff --git a/src/modules/unmanaged/CMakeLists.txt b/src/modules/unmanaged/CMakeLists.txt index 4c1bffa03a..4ae28e995c 100644 --- a/src/modules/unmanaged/CMakeLists.txt +++ b/src/modules/unmanaged/CMakeLists.txt @@ -43,9 +43,12 @@ add_subdirectory(pwm_pca9685) add_subdirectory(remote) add_subdirectory(ringbench) add_subdirectory(ringdemo) +add_subdirectory(sampler_latency_usr) +add_subdirectory(sampler_usr) add_subdirectory(scounter) add_subdirectory(shuttleexpress) add_subdirectory(storage) +add_subdirectory(streamer_usr) add_subdirectory(temp_ads7828) add_subdirectory(temp_atlas) add_subdirectory(temp_bbb) diff --git a/src/executables/script_helpers/CMakeLists.txt b/src/modules/unmanaged/sampler_latency_usr/CMakeLists.txt similarity index 73% rename from src/executables/script_helpers/CMakeLists.txt rename to src/modules/unmanaged/sampler_latency_usr/CMakeLists.txt index 71394e6ce5..58eaf20c40 100644 --- a/src/executables/script_helpers/CMakeLists.txt +++ b/src/modules/unmanaged/sampler_latency_usr/CMakeLists.txt @@ -23,3 +23,16 @@ # # ##################################################################### # ~~~ + +option(BUILD_SAMPLER_LATENCY_USR_UNMANAGED_MODULE + "Build the Sampler Lantency Usr unmanaged module." TRUE) + +if(BUILD_SAMPLER_LATENCY_USR_UNMANAGED_MODULE) + add_executable(sampler_latency_usr) + + set(SOURCE_FILES src/sampler_latency_usr.c) + + target_sources(sampler_latency_usr PRIVATE ${SOURCE_FILES}) + + target_link_libraries(sampler_latency_usr PRIVATE hal samstr_memdefs) +endif() diff --git a/decide_what_to_do/hal/components/sampler_latency_usr.c b/src/modules/unmanaged/sampler_latency_usr/src/sampler_latency_usr.c similarity index 99% rename from decide_what_to_do/hal/components/sampler_latency_usr.c rename to src/modules/unmanaged/sampler_latency_usr/src/sampler_latency_usr.c index 854bb98da1..d601784923 100644 --- a/decide_what_to_do/hal/components/sampler_latency_usr.c +++ b/src/modules/unmanaged/sampler_latency_usr/src/sampler_latency_usr.c @@ -20,7 +20,7 @@ #include "rtapi.h" /* RTAPI realtime OS API */ #include "hal.h" /* HAL public API decls */ -#include "streamer.h" +#include "samstr_memdefs/samstr_memdefs.h" /*********************************************************************** * LOCAL FUNCTION DECLARATIONS * diff --git a/cmake/toolchain/debianI386Toolchain.cmake b/src/modules/unmanaged/sampler_usr/CMakeLists.txt similarity index 69% rename from cmake/toolchain/debianI386Toolchain.cmake rename to src/modules/unmanaged/sampler_usr/CMakeLists.txt index fe4eb2c941..d453385b6e 100644 --- a/cmake/toolchain/debianI386Toolchain.cmake +++ b/src/modules/unmanaged/sampler_usr/CMakeLists.txt @@ -21,19 +21,20 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # -# #################################################################### +# ##################################################################### # ~~~ -set(CMAKE_SYSTEM_NAME "Linux") -set(CMAKE_SYSTEM_PROCESSOR "i686") -set(CMAKE_LIBRARY_ARCHITECTURE "i686-linux-gnu") +option(BUILD_SAMPLER_USR_UNMANAGED_MODULE + "Build the Sampler Usr unmanaged module." TRUE) + +if(BUILD_SAMPLER_USR_UNMANAGED_MODULE) + add_executable(sampler_usr) + + set(SOURCE_FILES src/sampler_usr.c) + + target_sources(sampler_usr PRIVATE ${SOURCE_FILES}) -set(ENV{PKG_CONFIG_LIBDIR} - "/usr/lib/i386-linux-gnu/pkgconfig:/usr/share/pkgconfig") -set(CMAKE_C_COMPILER "i686-linux-gnu-gcc") -set(CMAKE_CXX_COMPILER "i686-linux-gnu-g++") + target_link_libraries(sampler_usr PRIVATE hal samstr_memdefs) -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set_target_properties(sampler_usr PROPERTIES OUTPUT_NAME "halsampler") +endif() diff --git a/decide_what_to_do/hal/components/sampler_usr.c b/src/modules/unmanaged/sampler_usr/src/sampler_usr.c similarity index 99% rename from decide_what_to_do/hal/components/sampler_usr.c rename to src/modules/unmanaged/sampler_usr/src/sampler_usr.c index e64eebdc35..a904f66002 100644 --- a/decide_what_to_do/hal/components/sampler_usr.c +++ b/src/modules/unmanaged/sampler_usr/src/sampler_usr.c @@ -72,7 +72,7 @@ #include "rtapi.h" /* RTAPI realtime OS API */ #include "hal.h" /* HAL public API decls */ -#include "streamer.h" +#include "samstr_memdefs/samstr_memdefs.h" /*********************************************************************** * LOCAL FUNCTION DECLARATIONS * diff --git a/cmake/toolchain/debianArm64Toolchain.cmake b/src/modules/unmanaged/streamer_usr/CMakeLists.txt similarity index 69% rename from cmake/toolchain/debianArm64Toolchain.cmake rename to src/modules/unmanaged/streamer_usr/CMakeLists.txt index 99a986d137..03bc5fd793 100644 --- a/cmake/toolchain/debianArm64Toolchain.cmake +++ b/src/modules/unmanaged/streamer_usr/CMakeLists.txt @@ -21,19 +21,20 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # -# #################################################################### +# ##################################################################### # ~~~ -set(CMAKE_SYSTEM_NAME "Linux") -set(CMAKE_SYSTEM_PROCESSOR "aarch64") -set(CMAKE_LIBRARY_ARCHITECTURE "aarch64-linux-gnu") +option(BUILD_STREAMER_USR_UNMANAGED_MODULE + "Build the Streamer Usr unmanaged module." TRUE) + +if(BUILD_STREAMER_USR_UNMANAGED_MODULE) + add_executable(streamer_usr) + + set(SOURCE_FILES src/streamer_usr.c) + + target_sources(streamer_usr PRIVATE ${SOURCE_FILES}) -set(ENV{PKG_CONFIG_LIBDIR} - "/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig") -set(CMAKE_C_COMPILER "aarch64-linux-gnu-gcc") -set(CMAKE_CXX_COMPILER "aarch64-linux-gnu-g++") + target_link_libraries(streamer_usr PRIVATE hal samstr_memdefs) -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set_target_properties(streamer_usr PROPERTIES OUTPUT_NAME "halstreamer") +endif() diff --git a/decide_what_to_do/hal/components/streamer_usr.c b/src/modules/unmanaged/streamer_usr/src/streamer_usr.c similarity index 99% rename from decide_what_to_do/hal/components/streamer_usr.c rename to src/modules/unmanaged/streamer_usr/src/streamer_usr.c index ba48a936b7..10bf4e6ffe 100644 --- a/decide_what_to_do/hal/components/streamer_usr.c +++ b/src/modules/unmanaged/streamer_usr/src/streamer_usr.c @@ -68,7 +68,7 @@ #include "rtapi.h" /* RTAPI realtime OS API */ #include "hal.h" /* HAL public API decls */ -#include "streamer.h" +#include "samstr_memdefs/samstr_memdefs.h" /*********************************************************************** * LOCAL FUNCTION DECLARATIONS * diff --git a/cmake/tools/FindProtobuf.cmake b/support/cmake/tools/FindProtobuf.cmake similarity index 100% rename from cmake/tools/FindProtobuf.cmake rename to support/cmake/tools/FindProtobuf.cmake diff --git a/cmake/tools/FindReadline.cmake b/support/cmake/tools/FindReadline.cmake similarity index 100% rename from cmake/tools/FindReadline.cmake rename to support/cmake/tools/FindReadline.cmake diff --git a/cmake/tools/PEP503PythonIndex.cmake b/support/cmake/tools/PEP503PythonIndex.cmake similarity index 100% rename from cmake/tools/PEP503PythonIndex.cmake rename to support/cmake/tools/PEP503PythonIndex.cmake diff --git a/src/executables/script_helpers/src/machinekit_hal_script_helpers.py b/support/python/machinekit_hal_script_helpers.py similarity index 72% rename from src/executables/script_helpers/src/machinekit_hal_script_helpers.py rename to support/python/machinekit_hal_script_helpers.py index 70528cd8c9..8c83f723ae 100644 --- a/src/executables/script_helpers/src/machinekit_hal_script_helpers.py +++ b/support/python/machinekit_hal_script_helpers.py @@ -30,14 +30,15 @@ import re import os import sh +import pathlib +from typing import Union -# Debian 9 Stretch, Ubuntu 18.04 Bionic and (probably) other older distributions -# need in environment LANG=C.UTF-8 (or other similar specification of encoding) -# to properly function +# Ubuntu 18.04 Bionic needs in environment LANG=C.UTF-8 (or other similar +# specification of encoding) to properly function class PathExistsAction(argparse.Action): - def test_path(self: object, path) -> str: + def test_path(self, path: str) -> str: if not os.path.isdir(path): raise argparse.ArgumentError(self, "Path {} does not exist.".format(path)) @@ -56,36 +57,39 @@ def __call__(self, parser, namespace, values, option_string=None): class NormalizeMachinekitHALPath(): - def __init__(self: object, path): - self.path = path - self.root_path = "" + def __init__(self, path: Union[pathlib.Path, str]): + self.path = path if isinstance( + path, pathlib.Path) else pathlib.Path(path) + self.root_path: pathlib.Path = None - def version_file_valid(self: object) -> bool: - version_file = "{}/VERSION".format(self.root_path) + def version_file_valid(self) -> bool: + version_file = self.root_path / "VERSION" - if os.path.isfile(version_file): + if version_file.is_file(): with open(version_file, "r") as reader: version_string = reader.read() if re.match("^[0-9]+\.[0-9]+$", version_string): return True return False - def readme_file_valid(self: object) -> bool: - readme_file = "{}/README.md".format(self.root_path) + def readme_file_valid(self) -> bool: + readme_file = self.root_path / "README.md" - if os.path.isfile(readme_file): + if readme_file.is_file(): with open(readme_file, "r") as reader: readme_string = reader.read(500) if re.search("Machinekit-HAL", readme_string): return True return False - def copying_file_valid(self: object) -> bool: - if os.path.isfile("{}/COPYING".format(self.root_path)): + def copying_file_valid(self) -> bool: + copying_file = self.root_path / "COPYING" + + if copying_file.is_file(): return True return False - def is_machinekit_hal_repository_root(self: object) -> bool: + def is_machinekit_hal_repository_root(self) -> bool: if ( self.version_file_valid() and self.readme_file_valid() @@ -94,18 +98,18 @@ def is_machinekit_hal_repository_root(self: object) -> bool: return True return False - def getGitRepositoryRoot(self: object) -> None: + def getGitRepositoryRoot(self) -> None: try: - self.root_path = sh.git("rev-parse", - "--show-toplevel", - _tty_out=False, - _cwd=self.path).strip().rstrip(os.sep) + self.root_path = pathlib.Path(sh.git("rev-parse", + "--show-toplevel", + _tty_out=False, + _cwd=self.path).strip().rstrip(os.sep)) except sh.ErrorReturnCode as e: error_message = "Path {} is not a git repository. Error {}".format( self.path, e) raise ValueError(error_message) - def __call__(self: object) -> str: + def __call__(self) -> pathlib.Path: self.getGitRepositoryRoot() if self.is_machinekit_hal_repository_root(): return self.root_path diff --git a/tests/.gitignore b/tests/.gitignore index 469516e981..86e00f2d1a 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -4,3 +4,4 @@ bitops.0/bitops hm2-idrom/realtime.log* *.var *.var.bak +pipe-* diff --git a/tests/runtests/cpusets/skip b/tests/runtests/cpusets/skip new file mode 100755 index 0000000000..49cd71d143 --- /dev/null +++ b/tests/runtests/cpusets/skip @@ -0,0 +1,33 @@ +#!/bin/bash +# -*-shell-script-*- + +CPUSET_ROOT=/sys/fs/cgroup/cpuset +CPUSET_CPUS=1 + +# Skip the test if any of the below commands fail +set -e + +# Assert the cgtools are available +which cgcreate >&/dev/null + +# Assert we're not running Xenomai threads +test ! -e /sys/module/xeno_nucleus + +# Attempt to set up a cgroup with cpuset controller +# +# - Mount the cgroup cpuset controller if needed +# - Probably inadequate; see `partrt`, `create_dir_stubborn()` +test -d $CPUSET_ROOT || \ + mount -t cgroup -o cpuset none $CPUSET_ROOT +# +# - Create a "/rt" cgroup under the cpuset controller +sudo cgcreate -g cpuset:/rt +# +# - Assign CPU to "/rt" cgroup & other tweaks +sudo cgset -r cpuset.mems=0 /rt +sudo cgset -r cpuset.cpus=${CPUSET_CPUS} /rt +sudo cgset -r cpuset.cpu_exclusive=1 /rt +sudo cgset -r cpuset.sched_load_balance=0 /rt +# +# - Check that assignment worked +cgget -n -r cpuset.cpus /rt | grep -q "cpuset.cpus: ${CPUSET_CPUS}" diff --git a/tests/runtests/encoder-ratio-stepgen-v2.0/skip b/tests/runtests/encoder-ratio-stepgen-v2.0/skip new file mode 100755 index 0000000000..ecdbef95dd --- /dev/null +++ b/tests/runtests/encoder-ratio-stepgen-v2.0/skip @@ -0,0 +1,2 @@ +#!/bin/sh +exit 1 diff --git a/tests/runtests/encoder-ratio.0/skip b/tests/runtests/encoder-ratio.0/skip new file mode 100755 index 0000000000..ecdbef95dd --- /dev/null +++ b/tests/runtests/encoder-ratio.0/skip @@ -0,0 +1,2 @@ +#!/bin/sh +exit 1 diff --git a/tests/runtests/multiclick/skip b/tests/runtests/multiclick/skip new file mode 100755 index 0000000000..f9b3dcc601 --- /dev/null +++ b/tests/runtests/multiclick/skip @@ -0,0 +1,8 @@ +#!/bin/bash +exit 1 + +# if [ "x$IS_VM" == "xyes" ] ; then +# echo disabling test due to IS_VM=yes +# exit 1 +# fi +# exit 0 diff --git a/tests/runtests/pll_correction/skip b/tests/runtests/pll_correction/skip new file mode 100644 index 0000000000..94249fcb13 --- /dev/null +++ b/tests/runtests/pll_correction/skip @@ -0,0 +1,3 @@ +#!/bin/bash +# This test doesn't work reliably, especially on Travis CI. +exit 1