|
| 1 | +# Run the jobs below on every push to master branch and pull request. |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + - master |
| 9 | + |
| 10 | +# Runs basic configure, make and make check. |
| 11 | +jobs: |
| 12 | + # ubuntu: |
| 13 | + # name: Ubuntu |
| 14 | + # runs-on: ubuntu-${{ matrix.release }} |
| 15 | + # continue-on-error: true |
| 16 | + # strategy: |
| 17 | + # fail-fast: false |
| 18 | + # matrix: |
| 19 | + # release: |
| 20 | + # - 24.04 |
| 21 | + |
| 22 | + # steps: |
| 23 | + # - name: Identify the system |
| 24 | + # run: | |
| 25 | + # cat /etc/os-release |
| 26 | + |
| 27 | + # - name: Enable source repositories |
| 28 | + # run: | |
| 29 | + # sudo sed -i 's/Types: deb$/Types: deb deb-src/g' \ |
| 30 | + # /etc/apt/sources.list.d/ubuntu.sources |
| 31 | + |
| 32 | + # - name: Install build dependencies |
| 33 | + # run: | |
| 34 | + # sudo apt-get update |
| 35 | + # sudo apt-get -y build-dep guestfs-tools |
| 36 | + |
| 37 | + # - name: Install extra dependencies |
| 38 | + # run: | |
| 39 | + # # Git is needed to run git submodule command. |
| 40 | + # sudo apt-get -y install git |
| 41 | + |
| 42 | + # - name: Fix broken Ubuntu kernel permissions |
| 43 | + # run: | |
| 44 | + # # https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725 |
| 45 | + # sudo chmod 0644 /boot/vmlinuz* |
| 46 | + |
| 47 | + # - name: Enable KVM |
| 48 | + # run: | |
| 49 | + # sudo chmod 0666 /dev/kvm |
| 50 | + |
| 51 | + # - name: Checkout sources |
| 52 | + # uses: actions/checkout@v5 |
| 53 | + |
| 54 | + # - name: Checkout submodule |
| 55 | + # run: | |
| 56 | + # git submodule update --init |
| 57 | + |
| 58 | + # - name: Compile the code |
| 59 | + # run: | |
| 60 | + # autoreconf -fiv |
| 61 | + # ./configure |
| 62 | + # make -j |
| 63 | + |
| 64 | + # - name: Run the full tests |
| 65 | + # run: | |
| 66 | + # if ! make check; then |
| 67 | + # find -name test-suite.log -exec cat {} \; |
| 68 | + # exit 1 |
| 69 | + # fi |
| 70 | + |
| 71 | + fedora: |
| 72 | + name: Fedora |
| 73 | + runs-on: ubuntu-latest # VM where the container runs |
| 74 | + strategy: |
| 75 | + fail-fast: false |
| 76 | + matrix: |
| 77 | + release: |
| 78 | + - 43 |
| 79 | + |
| 80 | + container: |
| 81 | + image: quay.io/fedora/fedora:${{ matrix.release }} |
| 82 | + options: --security-opt seccomp=unconfined |
| 83 | + |
| 84 | + steps: |
| 85 | + - name: Identify the system |
| 86 | + run: | |
| 87 | + cat /etc/os-release |
| 88 | +
|
| 89 | + - name: Install build dependencies |
| 90 | + run: | |
| 91 | + dnf builddep -y guestfs-tools |
| 92 | +
|
| 93 | + - name: Install extra dependencies |
| 94 | + run: | |
| 95 | + # Git is needed to run git submodule command. |
| 96 | + dnf install -y git |
| 97 | +
|
| 98 | + - name: Checkout sources |
| 99 | + uses: actions/checkout@v5 |
| 100 | + |
| 101 | + - name: Create user |
| 102 | + run: | |
| 103 | + useradd -m -s /bin/bash -G wheel guestfs |
| 104 | + tail /etc/passwd |
| 105 | +
|
| 106 | + - name: Make checkout directory editable by the sscg user |
| 107 | + run: | |
| 108 | + chown -R guestfs:wheel ${GITHUB_WORKSPACE} |
| 109 | +
|
| 110 | + - name: Checkout submodule |
| 111 | + run: | |
| 112 | + su -c 'git submodule update --init' guestfs |
| 113 | +
|
| 114 | + - name: Compile the code |
| 115 | + run: | |
| 116 | + su -c ' |
| 117 | + autoreconf -fiv && |
| 118 | + ./configure CFLAGS="-fPIC -g -O2" && |
| 119 | + make -j |
| 120 | + ' guestfs |
| 121 | +
|
| 122 | + # - name: Run the full tests |
| 123 | + # run: | |
| 124 | + # # We have to set $HOME since su -p won't set it below. |
| 125 | + # export HOME=/home/guestfs |
| 126 | + # if ! su -p -c 'make check' guestfs; then |
| 127 | + # find -name test-suite.log -exec cat {} \; |
| 128 | + # exit 1 |
| 129 | + # fi |
0 commit comments