Skip to content

Commit

Permalink
Merge pull request #435 from vojtechtrefny/main_ansible-deps-update
Browse files Browse the repository at this point in the history
Misc updates for the test dependencies playbook
  • Loading branch information
vojtechtrefny authored Mar 5, 2024
2 parents 731a47e + acd73e1 commit 334df06
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 37 deletions.
40 changes: 30 additions & 10 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,36 @@ on:

jobs:
build:
name: static-analysis
runs-on: ubuntu-22.04
env:
CI_IMAGE: fedora:latest
CI_CONTAINER: blivet-gui-tests
steps:
- name: Checkout blivet-gui repository
uses: actions/checkout@v4

runs-on: ubuntu-latest
- name: Install podman
run: |
sudo apt -qq update
sudo apt -y -qq install podman
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get -y -qq install make ansible
sudo make install-requires
- name: Run checks
run: make check
- name: Start the container
run: |
podman run -d -t --name ${{ env.CI_CONTAINER }} --privileged --volume "$(pwd):/app" --workdir "/app" ${{ env.CI_IMAGE }}
- name: Install ansible in the container
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "dnf -y install ansible make which"
- name: Enable our daily builds Copr in the container
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "dnf -y install dnf-plugins-core && dnf -y copr enable @storage/blivet-daily"
- name: Install test dependencies in the container
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "ansible-playbook -i 'localhost,' -c local misc/install-test-dependencies.yml"
- name: Run static analysis tests in the container
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "make check"
8 changes: 4 additions & 4 deletions misc/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# development/testing.
#
# Use 'vagrant up && vagrant ssh' to spawn the default machine (most recent
# Fedora) and ssh into it or e.g. 'vagrant up blivet-gui-f38 && vagrant ssh blivet-gui-f38'
# to use a Fedora 38 based machine, etc.
# Fedora) and ssh into it or e.g. 'vagrant up blivet-gui-f40 && vagrant ssh blivet-gui-f40'
# to use a Fedora 40 based machine, etc.
#

def os_cpu_cores
Expand Down Expand Up @@ -35,8 +35,8 @@ Vagrant.configure("2") do |config|
ansible.playbook = "install-test-dependencies.yml"
end

config.vm.define "blivet-gui-f38", primary: true, autostart: true do |f38|
f38.vm.box = "fedora/38-cloud-base"
config.vm.define "blivet-gui-f40", primary: true, autostart: true do |f40|
f40.vm.box = "fedora/40-cloud-base"
end

config.vm.define "blivet-gui-f39", primary: false, autostart: false do |f39|
Expand Down
49 changes: 26 additions & 23 deletions misc/install-test-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@
- python3-pip
- gettext
- python3-polib
- libblockdev-part2
- libblockdev-part3
- btrfs-progs
- mdadm
- dosfstools
- e2fsprogs
- xfsprogs
Expand All @@ -84,22 +85,23 @@
- python3-bytesize
- python3-parted
- python3-selinux
- gir1.2-blockdev-2.0
- libblockdev-lvm2
- libblockdev-btrfs2
- libblockdev-swap2
- libblockdev-loop2
- libblockdev-crypto2
- libblockdev-mpath2
- libblockdev-dm2
- libblockdev-mdraid2
- libblockdev-nvdimm2
- gir1.2-blockdev-3.0
- libblockdev-lvm3
- libblockdev-btrfs3
- libblockdev-swap3
- libblockdev-loop3
- libblockdev-crypto3
- libblockdev-mpath3
- libblockdev-dm3
- libblockdev-mdraid3
- libblockdev-fs3
when: ansible_distribution == "Ubuntu" or ansible_distribution == "Debian"

# pocketlint, blivet and pid is not packaged on Ubuntu/Debian
- name: Install pocketlint, blivet and pid using pip (Ubuntu/Debian)
pip:
name: ['pocketlint', 'blivet', 'pid']
extra_args: --break-system-packages
when: ansible_distribution == "Ubuntu" or ansible_distribution == "Debian"

- name: Install runtime and build dependencies (OpenSUSE)
Expand Down Expand Up @@ -139,27 +141,28 @@
package: name={{item}} state=present
with_items:
- python3-libblockdev
- typelib-1_0-BlockDev-2_0
- typelib-1_0-BlockDev-3_0
- python3-libbytesize
- python3-parted
- python3-pyudev
- python3-six
- udev
- libbd_btrfs2
- libbd_crypto2
- libbd_dm2
- libbd_fs2
- libbd_kbd2
- libbd_loop2
- libbd_lvm2
- libbd_mdraid2
- libbd_mpath2
- libbd_swap2
- libbd_utils2
- libbd_btrfs3
- libbd_crypto3
- libbd_dm3
- libbd_fs3
- libbd_kbd3
- libbd_loop3
- libbd_lvm3
- libbd_mdraid3
- libbd_mpath3
- libbd_swap3
- libbd_utils3
when: ansible_os_family == "Suse"

# pocketlint, blivet and pid is not packaged on openSUSE
- name: Install pocketlint, blivet and pid using pip (openSUSE)
pip:
name: ['pocketlint', 'blivet', 'pid']
extra_args: --break-system-packages
when: ansible_os_family == "Suse"

0 comments on commit 334df06

Please sign in to comment.