summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 08:04:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 08:04:28 +0000
commit6504f7fe43e9264a110527374f4bbe20f8e0004d (patch)
tree6cf8220b628ebd2ccfc1375dd6516c6996e9abcc /.github
parentInitial commit. (diff)
downloadcryptsetup-6504f7fe43e9264a110527374f4bbe20f8e0004d.tar.xz
cryptsetup-6504f7fe43e9264a110527374f4bbe20f8e0004d.zip
Adding upstream version 2:2.6.1.upstream/2%2.6.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github')
-rwxr-xr-x.github/workflows/cibuild-setup-ubuntu.sh29
-rwxr-xr-x.github/workflows/cibuild.sh38
-rw-r--r--.github/workflows/cibuild.yml30
-rw-r--r--.github/workflows/coverity.yml48
4 files changed, 145 insertions, 0 deletions
diff --git a/.github/workflows/cibuild-setup-ubuntu.sh b/.github/workflows/cibuild-setup-ubuntu.sh
new file mode 100755
index 0000000..2c0adb2
--- /dev/null
+++ b/.github/workflows/cibuild-setup-ubuntu.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -ex
+
+PACKAGES=(
+ git make autoconf automake autopoint pkg-config libtool libtool-bin
+ gettext libssl-dev libdevmapper-dev libpopt-dev uuid-dev libsepol-dev
+ libjson-c-dev libssh-dev libblkid-dev tar libargon2-0-dev libpwquality-dev
+ sharutils dmsetup jq xxd expect keyutils netcat passwd openssh-client sshpass
+ asciidoctor
+)
+
+COMPILER="${COMPILER:?}"
+COMPILER_VERSION="${COMPILER_VERSION:?}"
+RELEASE="$(lsb_release -cs)"
+
+bash -c "echo 'deb-src http://archive.ubuntu.com/ubuntu/ $RELEASE main restricted universe multiverse' >>/etc/apt/sources.list"
+
+# Latest gcc stack deb packages provided by
+# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
+add-apt-repository -y ppa:ubuntu-toolchain-r/test
+PACKAGES+=(gcc-$COMPILER_VERSION)
+
+# scsi_debug, gost crypto
+PACKAGES+=(dkms linux-headers-$(uname -r) linux-modules-extra-$(uname -r) gost-crypto-dkms)
+
+apt-get -y update --fix-missing
+apt-get -y install "${PACKAGES[@]}"
+apt-get -y build-dep cryptsetup
diff --git a/.github/workflows/cibuild.sh b/.github/workflows/cibuild.sh
new file mode 100755
index 0000000..55ddd17
--- /dev/null
+++ b/.github/workflows/cibuild.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+PHASES=(${@:-CONFIGURE MAKE CHECK})
+COMPILER="${COMPILER:?}"
+COMPILER_VERSION="${COMPILER_VERSION}"
+CFLAGS=(-O1 -g)
+CXXFLAGS=(-O1 -g)
+
+CC="gcc${COMPILER_VERSION:+-$COMPILER_VERSION}"
+CXX="g++${COMPILER_VERSION:+-$COMPILER_VERSION}"
+
+set -ex
+
+for phase in "${PHASES[@]}"; do
+ case $phase in
+ CONFIGURE)
+ opts=(
+ --enable-libargon2
+ )
+
+ sudo -E git clean -xdf
+
+ ./autogen.sh
+ CC="$CC" CXX="$CXX" CFLAGS="${CFLAGS[@]}" CXXFLAGS="${CXXFLAGS[@]}" ./configure "${opts[@]}"
+ ;;
+ MAKE)
+ make -j
+ make -j -C tests check-programs
+ ;;
+ CHECK)
+ make check
+ ;;
+
+ *)
+ echo >&2 "Unknown phase '$phase'"
+ exit 1
+ esac
+done
diff --git a/.github/workflows/cibuild.yml b/.github/workflows/cibuild.yml
new file mode 100644
index 0000000..2698389
--- /dev/null
+++ b/.github/workflows/cibuild.yml
@@ -0,0 +1,30 @@
+name: Build test
+on:
+ push:
+ branches:
+ - 'main'
+ - 'wip-luks2'
+ - 'v2.3.x'
+ - 'v2.4.x'
+ paths-ignore:
+ - 'docs/**'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ if: github.repository == 'mbroz/cryptsetup'
+ strategy:
+ fail-fast: false
+ matrix:
+ env:
+ - { COMPILER: "gcc", COMPILER_VERSION: "11", RUN_SSH_PLUGIN_TEST: "1" }
+ env: ${{ matrix.env }}
+ steps:
+ - name: Repository checkout
+ uses: actions/checkout@v1
+ - name: Ubuntu setup
+ run: sudo -E .github/workflows/cibuild-setup-ubuntu.sh
+ - name: Configure & Make
+ run: .github/workflows/cibuild.sh CONFIGURE MAKE
+ - name: Check
+ run: sudo -E .github/workflows/cibuild.sh CHECK
diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
new file mode 100644
index 0000000..edc88e8
--- /dev/null
+++ b/.github/workflows/coverity.yml
@@ -0,0 +1,48 @@
+name: Coverity test
+on:
+ push:
+ branches:
+ - 'coverity_scan'
+ paths-ignore:
+ - 'docs/**'
+
+jobs:
+ latest:
+ runs-on: ubuntu-latest
+ if: github.repository == 'mbroz/cryptsetup'
+ steps:
+ - name: Repository checkout
+ uses: actions/checkout@v1
+ - name: Ubuntu setup
+ run: sudo -E .github/workflows/cibuild-setup-ubuntu.sh
+ env:
+ COMPILER: "gcc"
+ COMPILER_VERSION: "11"
+ - name: Install Coverity
+ run: |
+ wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=mbroz/cryptsetup" -O cov-analysis-linux64.tar.gz
+ mkdir cov-analysis-linux64
+ tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
+ env:
+ TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
+ - name: Run autoconf & configure
+ run: |
+ ./autogen.sh
+ ./configure
+ - name: Run cov-build
+ run: |
+ export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
+ cov-build --dir cov-int make
+ - name: Submit to Coverity Scan
+ run: |
+ tar czvf cryptsetup.tgz cov-int
+ curl \
+ --form project=mbroz/cryptsetup \
+ --form token=$TOKEN \
+ --form email=gmazyland@gmail.com \
+ --form file=@cryptsetup.tgz \
+ --form version=trunk \
+ --form description="`./cryptsetup --version`" \
+ https://scan.coverity.com/builds?project=mbroz/cryptsetup
+ env:
+ TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}