Merge pull request #2610 from cgwalters/ci-tweaks-2
ci: Move codestyle and min build to GH actions
This commit is contained in:
commit
e632e5f1f1
|
|
@ -1,7 +1,6 @@
|
||||||
// Documentation: https://github.com/coreos/coreos-ci/blob/main/README-upstream-ci.md
|
// Documentation: https://github.com/coreos/coreos-ci/blob/main/README-upstream-ci.md
|
||||||
|
|
||||||
stage("Build") {
|
stage("Build") {
|
||||||
parallel normal: {
|
|
||||||
def n = 5
|
def n = 5
|
||||||
buildPod(memory: "2Gi", cpu: "${n}") {
|
buildPod(memory: "2Gi", cpu: "${n}") {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
@ -36,34 +35,6 @@ parallel normal: {
|
||||||
}
|
}
|
||||||
stash includes: "installed/", name: 'build'
|
stash includes: "installed/", name: 'build'
|
||||||
}
|
}
|
||||||
},
|
|
||||||
// A minimal build, helps test our build options
|
|
||||||
minimal: {
|
|
||||||
buildPod() {
|
|
||||||
checkout scm
|
|
||||||
shwrap("""
|
|
||||||
git submodule update --init
|
|
||||||
|
|
||||||
env NOCONFIGURE=1 ./autogen.sh
|
|
||||||
./configure --without-curl --without-soup --disable-gtk-doc --disable-man \
|
|
||||||
--disable-rust --without-libarchive --without-selinux --without-smack \
|
|
||||||
--without-openssl --without-avahi --without-libmount --disable-rofiles-fuse \
|
|
||||||
--without-libsodium
|
|
||||||
make
|
|
||||||
""")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
codestyle: {
|
|
||||||
buildPod() {
|
|
||||||
checkout scm
|
|
||||||
shwrap("""
|
|
||||||
# Jenkins by default only fetches the branch it's testing. Explicitly fetch main
|
|
||||||
# for ci-commitmessage-submodules.sh
|
|
||||||
git fetch origin +refs/heads/main:refs/remotes/origin/main
|
|
||||||
ci/ci-commitmessage-submodules.sh
|
|
||||||
""")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build FCOS and do a kola basic run
|
// Build FCOS and do a kola basic run
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,39 @@ permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
codestyle:
|
||||||
|
name: "Code style"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: registry.ci.openshift.org/coreos/fcos-buildroot:testing-devel
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: true
|
||||||
|
# https://github.com/actions/checkout/issues/760
|
||||||
|
- name: Mark git checkout as safe
|
||||||
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
|
- name: Test style
|
||||||
|
run: ./ci/ci-commitmessage-submodules.sh
|
||||||
|
minimal:
|
||||||
|
name: "Build - FCOS minimal"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: registry.ci.openshift.org/coreos/fcos-buildroot:testing-devel
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
# https://github.com/actions/checkout/issues/760
|
||||||
|
- name: Mark git checkout as safe
|
||||||
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
env NOCONFIGURE=1 ./autogen.sh &&
|
||||||
|
./configure --without-curl --without-soup --disable-gtk-doc --disable-man \
|
||||||
|
--disable-rust --without-libarchive --without-selinux --without-smack \
|
||||||
|
--without-openssl --without-avahi --without-libmount --disable-rofiles-fuse \
|
||||||
|
--without-libsodium &&
|
||||||
|
make
|
||||||
tests:
|
tests:
|
||||||
# Distro configuration matrix
|
# Distro configuration matrix
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ gitdir=$(realpath $(pwd))
|
||||||
# try to read the submodules from the Internet again. If we wanted to
|
# try to read the submodules from the Internet again. If we wanted to
|
||||||
# require a newer git, we could use `git worktree`.
|
# require a newer git, we could use `git worktree`.
|
||||||
cp -a ${gitdir} ${tmpd}/workdir
|
cp -a ${gitdir} ${tmpd}/workdir
|
||||||
|
git config --global --add safe.directory "${tmpd}/workdir"
|
||||||
cd ${tmpd}/workdir
|
cd ${tmpd}/workdir
|
||||||
git log --pretty=oneline origin/main..$HEAD | while read logline; do
|
git log --pretty=oneline origin/main..$HEAD | while read logline; do
|
||||||
commit=$(echo ${logline} | cut -f 1 -d ' ')
|
commit=$(echo ${logline} | cut -f 1 -d ' ')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue