projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GitHub CI: run most tests as a non-privileged user.
[tinc]
/
.github
/
workflows
/
test.yml
diff --git
a/.github/workflows/test.yml
b/.github/workflows/test.yml
index
6c6323c
..
4a250d4
100644
(file)
--- a/
.github/workflows/test.yml
+++ b/
.github/workflows/test.yml
@@
-10,6
+10,7
@@
on:
jobs:
code-style:
runs-on: ubuntu-latest
jobs:
code-style:
runs-on: ubuntu-latest
+ timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v2
steps:
- name: Checkout code
uses: actions/checkout@v2
@@
-42,10
+43,12
@@
jobs:
sanitizer:
runs-on: ubuntu-latest
sanitizer:
runs-on: ubuntu-latest
+ timeout-minutes: 10
strategy:
fail-fast: false
matrix:
sanitizer:
strategy:
fail-fast: false
matrix:
sanitizer:
+ - address
- thread
- undefined
env:
- thread
- undefined
env:
@@
-86,6
+89,7
@@
jobs:
linux:
runs-on: ubuntu-latest
linux:
runs-on: ubuntu-latest
+ timeout-minutes: 10
strategy:
fail-fast: false
matrix:
strategy:
fail-fast: false
matrix:
@@
-103,20
+107,21
@@
jobs:
container:
image: ${{ matrix.os }}
options: --privileged
container:
image: ${{ matrix.os }}
options: --privileged
-
+ env:
+ CI: 1
steps:
- name: Install deps (Alpine)
run: >
apk add git binutils make autoconf automake gcc linux-headers libtool
diffutils texinfo procps openssl-dev zlib-dev lzo-dev ncurses-dev
steps:
- name: Install deps (Alpine)
run: >
apk add git binutils make autoconf automake gcc linux-headers libtool
diffutils texinfo procps openssl-dev zlib-dev lzo-dev ncurses-dev
- readline-dev musl-dev lz4-dev socat
+ readline-dev musl-dev lz4-dev socat
shadow sudo
if: startsWith(matrix.os, 'alpine')
- name: Install deps (Debian and Ubuntu)
shell: bash
run: |
apt-get update
if: startsWith(matrix.os, 'alpine')
- name: Install deps (Debian and Ubuntu)
shell: bash
run: |
apt-get update
- apt-get install -y git binutils make autoconf automake gcc diffutils \
+ apt-get install -y git binutils make autoconf automake gcc diffutils
sudo
\
texinfo netcat procps socat zlib1g-dev lib{ssl,lzo2,lz4,ncurses,readline}-dev
env:
DEBIAN_FRONTEND: noninteractive
texinfo netcat procps socat zlib1g-dev lib{ssl,lzo2,lz4,ncurses,readline}-dev
env:
DEBIAN_FRONTEND: noninteractive
@@
-130,15
+135,15
@@
jobs:
dnf config-manager --enable powertools
fi
yum install -y epel-release
dnf config-manager --enable powertools
fi
yum install -y epel-release
- yum install -y git binutils make autoconf automake gcc diffutils \
+ yum install -y git binutils make autoconf automake gcc diffutils
sudo
\
texinfo netcat procps socat {lzo,zlib,lz4,ncurses,readline}-devel
texinfo netcat procps socat {lzo,zlib,lz4,ncurses,readline}-devel
- yum install
openssl11-devel || yum install
openssl-devel
+ yum install
-y openssl11-devel || yum install -y
openssl-devel
if: startsWith(matrix.os, 'centos') || startsWith(matrix.os, 'alma')
- name: Install deps (SUSE)
shell: bash
run: >
if: startsWith(matrix.os, 'centos') || startsWith(matrix.os, 'alma')
- name: Install deps (SUSE)
shell: bash
run: >
- zypper install -y tar git binutils make autoconf automake gcc procps
+ zypper install -y tar git binutils make autoconf automake gcc procps
sudo
makeinfo diffutils gzip socat {openssl,zlib,lzo,liblz4,ncurses,readline}-devel
if: startsWith(matrix.os, 'opensuse')
makeinfo diffutils gzip socat {openssl,zlib,lzo,liblz4,ncurses,readline}-devel
if: startsWith(matrix.os, 'opensuse')
@@
-150,11
+155,17
@@
jobs:
- name: Assign name for test results artifact
run: echo TEST_ARTIFACT="$(echo '${{ matrix.os }}' | sed 's|[:/]|_|g')" >>"$GITHUB_ENV"
- name: Assign name for test results artifact
run: echo TEST_ARTIFACT="$(echo '${{ matrix.os }}' | sed 's|[:/]|_|g')" >>"$GITHUB_ENV"
+ - name: Create a non-privileged user
+ run: |
+ useradd --user-group build
+ chown -R build:build .
+ echo 'build ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/build
+
- name: Run tests with default settings
- name: Run tests with default settings
- run: sh .github/workflows/test/run.sh default
+ run: s
udo -u build CI=1 s
h .github/workflows/test/run.sh default
- name: Run tests without legacy protocol
- name: Run tests without legacy protocol
- run: sh .github/workflows/test/run.sh nolegacy
+ run: s
udo -u build CI=1 s
h .github/workflows/test/run.sh nolegacy
- name: Upload test results
uses: actions/upload-artifact@v2
- name: Upload test results
uses: actions/upload-artifact@v2
@@
-172,6
+183,7
@@
jobs:
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
+ timeout-minutes: 5
steps:
- name: Checkout code
steps:
- name: Checkout code
@@
-220,6
+232,7
@@
jobs:
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
+ timeout-minutes: 5
steps:
- name: Download built packages
steps:
- name: Download built packages
@@
-251,6
+264,7
@@
jobs:
macos:
runs-on: macos-latest
macos:
runs-on: macos-latest
+ timeout-minutes: 10
strategy:
fail-fast: false
strategy:
fail-fast: false
@@
-290,6
+304,7
@@
jobs:
windows:
runs-on: windows-latest
windows:
runs-on: windows-latest
+ timeout-minutes: 20
strategy:
fail-fast: false
strategy:
fail-fast: false