|
| 1 | +name: pull-request |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + |
| 11 | +jobs: |
| 12 | + cross-build-pull-request: |
| 13 | + runs-on: ubuntu-20.04 |
| 14 | + container: vathpela/efi-ci:${{ matrix.distro }}-x64 |
| 15 | + name: ${{ matrix.distro }} ${{ matrix.efiarch }} cross-build |
| 16 | + |
| 17 | + strategy: |
| 18 | + fail-fast: false |
| 19 | + matrix: |
| 20 | + include: |
| 21 | + - arch: amd64 |
| 22 | + efiarch: aa64 |
| 23 | + gccarch: aarch64 |
| 24 | + makearch: aarch64 |
| 25 | + distro: f36 |
| 26 | + - arch: amd64 |
| 27 | + efiarch: aa64 |
| 28 | + gccarch: aarch64 |
| 29 | + makearch: aarch64 |
| 30 | + distro: f35 |
| 31 | + - arch: amd64 |
| 32 | + efiarch: arm |
| 33 | + gccarch: arm |
| 34 | + makearch: arm |
| 35 | + distro: f36 |
| 36 | + - arch: amd64 |
| 37 | + efiarch: arm |
| 38 | + gccarch: arm |
| 39 | + makearch: arm |
| 40 | + distro: f35 |
| 41 | + - arch: amd64 |
| 42 | + efiarch: arm |
| 43 | + gccarch: arm |
| 44 | + makearch: arm |
| 45 | + distro: f34 |
| 46 | + - arch: amd64 |
| 47 | + efiarch: x64 |
| 48 | + gccarch: x86_64 |
| 49 | + makearch: x86_64 |
| 50 | + distro: f36 |
| 51 | + - arch: amd64 |
| 52 | + efiarch: x64 |
| 53 | + gccarch: x86_64 |
| 54 | + makearch: x86_64 |
| 55 | + distro: f35 |
| 56 | + - arch: amd64 |
| 57 | + efiarch: x64 |
| 58 | + gccarch: x86_64 |
| 59 | + makearch: x86_64 |
| 60 | + distro: f34 |
| 61 | + - arch: amd64 |
| 62 | + efiarch: ia32 |
| 63 | + gccarch: x86_64 |
| 64 | + makearch: ia32 |
| 65 | + distro: f36 |
| 66 | + - arch: amd64 |
| 67 | + efiarch: ia32 |
| 68 | + gccarch: x86_64 |
| 69 | + makearch: ia32 |
| 70 | + distro: f35 |
| 71 | + - arch: amd64 |
| 72 | + efiarch: ia32 |
| 73 | + gccarch: x86_64 |
| 74 | + makearch: ia32 |
| 75 | + distro: f34 |
| 76 | + |
| 77 | + steps: |
| 78 | + - name: Checkout |
| 79 | + uses: actions/checkout@v2 |
| 80 | + with: |
| 81 | + # otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger) |
| 82 | + ref: ${{ github.event.pull_request.head.sha }} |
| 83 | + fetch-depth: 0 |
| 84 | + submodules: recursive |
| 85 | + - name: Update submodules on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 86 | + id: update-submodules |
| 87 | + run: | |
| 88 | + make update |
| 89 | + - name: Make a build directory for ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 90 | + id: builddir |
| 91 | + run: | |
| 92 | + rm -rf build-${{ matrix.distro }}-${{ matrix.efiarch }} |
| 93 | + mkdir build-${{ matrix.distro }}-${{ matrix.efiarch }} |
| 94 | + cd build-${{ matrix.distro }}-${{ matrix.efiarch }} |
| 95 | + - name: Do the build on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 96 | + id: build |
| 97 | + run: | |
| 98 | + pwd |
| 99 | + cd build-${{ matrix.distro }}-${{ matrix.efiarch }} |
| 100 | + make TOPDIR=.. -f ../Makefile CROSS_COMPILE=${{ matrix.gccarch }}-linux-gnu- ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true VENDOR_DB_FILE=../data/testdb.esl all |
| 101 | + - name: Install on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 102 | + id: install |
| 103 | + run: | |
| 104 | + pwd |
| 105 | + cd build-${{ matrix.distro }}-${{ matrix.efiarch }} |
| 106 | + make TOPDIR=.. -f ../Makefile CROSS_COMPILE=${{ matrix.gccarch }}-linux-gnu- ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test install |
| 107 | + echo 'results:' |
| 108 | + find /destdir -type f |
| 109 | +
|
| 110 | + build-pull-request-intel: |
| 111 | + runs-on: ubuntu-20.04 |
| 112 | + container: vathpela/efi-ci:${{ matrix.distro }}-x64 |
| 113 | + name: ${{ matrix.distro }} ${{ matrix.efiarch }} build |
| 114 | + |
| 115 | + strategy: |
| 116 | + matrix: |
| 117 | + include: |
| 118 | + - arch: amd64 |
| 119 | + efiarch: x64 |
| 120 | + makearch: x86_64 |
| 121 | + distro: f36 |
| 122 | + - arch: amd64 |
| 123 | + efiarch: x64 |
| 124 | + makearch: x86_64 |
| 125 | + distro: f35 |
| 126 | + - arch: amd64 |
| 127 | + efiarch: x64 |
| 128 | + makearch: x86_64 |
| 129 | + distro: f34 |
| 130 | + - arch: amd64 |
| 131 | + efiarch: x64 |
| 132 | + makearch: x86_64 |
| 133 | + distro: centos9 |
| 134 | + - arch: amd64 |
| 135 | + efiarch: ia32 |
| 136 | + makearch: ia32 |
| 137 | + distro: f36 |
| 138 | + - arch: amd64 |
| 139 | + efiarch: ia32 |
| 140 | + makearch: ia32 |
| 141 | + distro: f35 |
| 142 | + - arch: amd64 |
| 143 | + efiarch: ia32 |
| 144 | + makearch: ia32 |
| 145 | + distro: f34 |
| 146 | + |
| 147 | + steps: |
| 148 | + - name: Checkout |
| 149 | + uses: actions/checkout@v2 |
| 150 | + with: |
| 151 | + # otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger) |
| 152 | + ref: ${{ github.event.pull_request.head.sha }} |
| 153 | + fetch-depth: 0 |
| 154 | + submodules: recursive |
| 155 | + - name: Update submodules on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 156 | + id: update-submodules |
| 157 | + run: | |
| 158 | + make update |
| 159 | + - name: Do 'make clean' on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 160 | + id: clean |
| 161 | + run: | |
| 162 | + make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true clean |
| 163 | + - name: Do the build on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 164 | + id: build |
| 165 | + run: | |
| 166 | + make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true VENDOR_DB_FILE=data/testdb.esl all |
| 167 | + - name: Install on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 168 | + id: install |
| 169 | + run: | |
| 170 | + make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test install |
| 171 | + echo 'results:' |
| 172 | + find /destdir -type f |
0 commit comments