-
Notifications
You must be signed in to change notification settings - Fork 871
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bump ci dependency versions (#5660)
- use canonical/lxd action in integration test - optimize integration test to run faster and use less resources
- Loading branch information
Showing
7 changed files
with
46 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,70 +20,57 @@ env: | |
RELEASE: focal | ||
|
||
jobs: | ||
package-build: | ||
runs-on: ubuntu-22.04 | ||
build-package-and-run-tests: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
# Fetch all tags for tools/read-version | ||
fetch-depth: 0 | ||
- name: Prepare dependencies | ||
run: | | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get update | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install \ | ||
debhelper \ | ||
dh-python \ | ||
fakeroot \ | ||
python3-setuptools \ | ||
sbuild \ | ||
ubuntu-dev-tools | ||
ubuntu-dev-tools \ | ||
tox \ | ||
wireguard \ | ||
$(\ | ||
./tools/read-dependencies \ | ||
--requirements-file requirements.txt \ | ||
--requirements-file test-requirements.txt \ | ||
--distro ubuntu \ | ||
--system-pkg-names 2> /dev/null \ | ||
| tr '\n' ' ' \ | ||
) | ||
sudo sbuild-adduser $USER | ||
cp /usr/share/doc/sbuild/examples/example.sbuildrc /home/$USER/.sbuildrc | ||
# Install all build and test dependencies | ||
./tools/read-dependencies -r requirements.txt -r test-requirements.txt -d ubuntu -s -i | ||
- name: Build package | ||
run: | | ||
./packages/bddeb -S -d --release ${{ env.RELEASE }} | ||
sudo -E su $USER -c 'mk-sbuild ${{ env.RELEASE }}' | ||
sudo -E su $USER -c 'DEB_BUILD_OPTIONS=nocheck sbuild --nolog --no-run-lintian --no-run-autopkgtest --verbose --dist=${{ env.RELEASE }} --build-dir=${{ runner.temp }} cloud-init_*.dsc' | ||
- name: Archive debs as artifacts | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: 'cloud-init-${{ env.RELEASE }}-deb' | ||
path: '${{ runner.temp }}/cloud-init*.deb' | ||
retention-days: 3 | ||
|
||
integration-tests: | ||
needs: package-build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
with: | ||
# Fetch all tags for tools/read-version | ||
fetch-depth: 0 | ||
- name: Retrieve cloud-init package | ||
uses: actions/download-artifact@v3 | ||
- name: Setup LXD | ||
uses: canonical/[email protected] | ||
with: | ||
name: 'cloud-init-${{ env.RELEASE }}-deb' | ||
channel: latest/candidate | ||
- name: Verify deb package | ||
run: | | ||
ls -hal cloud-init*.deb | ||
- name: Prepare test tools | ||
run: | | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y update | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install tox wireguard | ||
- name: Initialize LXD | ||
ls -hal '${{ runner.temp }}' | ||
echo ${{ runner.temp }}/cloud-init*.deb || true | ||
ls -hal ${{ runner.temp }}/cloud-init*.deb || true | ||
- name: Set up Pycloudlib | ||
run: | | ||
ssh-keygen -P "" -q -f ~/.ssh/id_rsa | ||
echo "[lxd]" > /home/$USER/.config/pycloudlib.toml | ||
sudo adduser $USER lxd | ||
# Jammy GH Action runners have docker installed, which edits iptables | ||
# in a way that is incompatible with lxd. | ||
# https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker | ||
sudo iptables -I DOCKER-USER -j ACCEPT | ||
sudo lxd init --auto | ||
- name: Run integration Tests | ||
run: | | ||
sg lxd -c 'CLOUD_INIT_CLOUD_INIT_SOURCE="$(ls cloud-init*.deb)" tox -e integration-tests-ci' | ||
sh -c 'CLOUD_INIT_CLOUD_INIT_SOURCE="$(ls ${{ runner.temp }}/cloud-init*.deb)" tox -e integration-tests-ci' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters