Skip to content

Commit

Permalink
temporarily reduce ci for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
morisja committed Oct 11, 2024
1 parent 731e975 commit c429e61
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 172 deletions.
168 changes: 0 additions & 168 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,53 +31,6 @@ jobs:
- name: Build
run: cargo build --verbose

build-debian-12:
runs-on: ubuntu-latest
container: debian:12

steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get -y install build-essential dpkg-dev ca-certificates sudo curl
apt-get -y build-dep .
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ github.event.schedule && 'nightly' || 'stable' }}
- name: Build
run: cargo build --verbose

build-debian-13:
runs-on: ubuntu-latest
container: debian:trixie

steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get -y install build-essential dpkg-dev ca-certificates sudo curl
apt-get -y build-dep .
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ github.event.schedule && 'nightly' || 'stable' }}
- name: Build
run: cargo build --verbose

clippy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ github.event.schedule && 'nightly' || 'stable' }}
- run: rustup component add clippy
- name: rust-clippy-check
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}


build-debian-package-11:
Expand Down Expand Up @@ -109,77 +62,6 @@ jobs:
./*
!./clone/**
build-debian-package-12:
runs-on: ubuntu-latest
container: debian:12

steps:
- uses: actions/checkout@v4
with:
path: clone
- name: Install dependencies
run: |
apt-get update
apt-get install -y build-essential dpkg-dev ca-certificates sudo curl
cd clone
apt-get build-dep -y .
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ github.event.schedule && 'nightly' || 'stable' }}
- name: Build package
run: |
debian/rules vendor
dpkg-buildpackage --no-sign
working-directory: clone
- uses: actions/upload-artifact@v3
with:
name: deb-package-debian-12
path: |
./*
!./clone/**
build-debian-package-13:
runs-on: ubuntu-latest
container: debian:trixie

steps:
- uses: actions/checkout@v4
with:
path: clone
- name: Install dependencies
run: |
apt-get update
apt-get install -y build-essential dpkg-dev ca-certificates sudo curl
cd clone
apt-get build-dep -y .
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ github.event.schedule && 'nightly' || 'stable' }}
- name: Build package
run: |
debian/rules vendor
dpkg-buildpackage --no-sign
working-directory: clone
- uses: actions/upload-artifact@v3
with:
name: deb-package-debian-13
path: |
./*
!./clone/**
run-ci-ubuntu-latest:
runs-on: ubuntu-latest
needs: [build-debian-package-11, build-debian-package-12, build-debian-package-13]

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: deb-package-debian-12
- name: CI
run: ci/test.sh
env:
HAVE_SYSTEMD: "1"
run-ci-debian-11:
Expand All @@ -201,43 +83,6 @@ jobs:
env:
HAVE_SYSTEMD: "0"

run-ci-debian-12:
runs-on: ubuntu-latest
container: debian:12
needs: [build-debian-package-12]

steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get -y install build-essential
- uses: actions/download-artifact@v3
with:
name: deb-package-debian-12
- name: CI
run: ci/test.sh
env:
HAVE_SYSTEMD: "0"

run-ci-debian-13:
runs-on: ubuntu-latest
container: debian:trixie
needs: [build-debian-package-13]

steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get -y install build-essential
- uses: actions/download-artifact@v3
with:
name: deb-package-debian-13
- name: CI
run: ci/test.sh
env:
HAVE_SYSTEMD: "0"

# This step deliberately uses a vm
run-enhanced-ci-debian-11:
Expand All @@ -256,16 +101,3 @@ jobs:
- name: CI
run: ci/test_nspawn.sh

create-release:
runs-on: ubuntu-latest
needs: [run-ci-ubuntu-latest, run-ci-debian-11, run-ci-debian-12, run-ci-debian-13, run-enhanced-ci-debian-11]
if: github.event.release

steps:
- uses: actions/download-artifact@v3
with:
name: deb-package-debian-11
- uses: softprops/action-gh-release@v2
with:
files: "*"
tag_name: ${{ github.event.release.tag_name }}
15 changes: 11 additions & 4 deletions ci/test_nspawn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,25 @@ sudo dpkg -i nsncd*.deb

sdns="sudo systemd-nspawn -q --bind-ro /var/run/nscd/socket:/var/run/nscd/socket -D /stable-chroot"

# required for netgroup and innetgr
# Install the tooling required for netgroup and innetgr
# Ensure nsswitch knows to read files for netgroup
${sdns} apt-get update
${sdns} apt-get install ng-utils
${sdns} sed 's/netgroup/d' -i /etc/nsswitch.conf
${sdns} sed '$netgroup: files' -i /etc/nsswitch.conf
${sdns} sed '/netgroup/d' -i /etc/nsswitch.conf
${sdns} sed '$ a netgroup: files' -i /etc/nsswitch.conf

# Similar nsswitch config for the host system so nsncd can access our test data
sudo sed '/netgroup/d' -i /etc/nsswitch.conf
sudo sed '$ a netgroup: files' -i /etc/nsswitch.conf

rc=0

sudo useradd nsncdtest
echo -e "foo1\t65000/tcp" | sudo tee -a /etc/services
echo -e "foo1\t65000/udp" | sudo tee -a /etc/services
echo "trusted-machines (machine1,user1,domain1), (machine2,user2,domain2), (machine3,user3,domain3)\n" | sudo tee -a /etc/netgroup
echo -e "trusted-machines (machine1,user1,domain1), (machine2,user2,domain2), (machine3,user3,domain3)\n" | sudo tee -a /etc/netgroup

tail /etc/passwd
tail /etc/services
cat /etc/netgroup
cat /stable-chroot/etc/nsswitch.conf
Expand All @@ -43,4 +49,5 @@ for i in $(seq 1 1); do
${sdns} innetgr -h machine1 -u user1 -d domain1 trusted-machines || rc=1
done

sudo journalctl -u nsncd.servce -n 100
exit ${rc}

0 comments on commit c429e61

Please sign in to comment.