name: sd-card-images CI on: push: branches: "*" pull_request: branches: - "master" schedule: - cron: "00 03 * * 0" permissions: id-token: write contents: read jobs: build-boot-x86: runs-on: ubuntu-latest name: build x86 steps: - name: Install dependencies timeout-minutes: 5 env: DEBIAN_FRONTEND: noninteractive run: | sudo apt-get update sudo apt-get --assume-yes \ --no-install-recommends \ install bc \ bison \ bzip2 \ ca-certificates \ device-tree-compiler \ dosfstools \ flex \ gcc \ gcc-arm-none-eabi \ gcc-i686-linux-gnu \ git \ libssl-dev \ make \ mtools \ parted \ pigz \ python2-dev \ python3-dev \ python3-pkg-resources \ swig - name: Checkout uses: actions/checkout@v3 - name: Build qemu_x86_virt timeout-minutes: 5 run: | env PATH=$GITHUB_WORKSPACE/scripts:$PATH \ ARTIFACTS_DIR=$RUNNER_TEMP \ build-boot qemu_x86_virt \ qemu-x86 \ qemu-x86_defconfig \ i686-linux-gnu - uses: actions/upload-artifact@v2 with: name: boot-qemu_x86_virt-master path: ${{ runner.temp }}/boot-qemu_x86_virt.bin.gz if-no-files-found: error retention-days: 1 test-debian-x86: runs-on: ubuntu-latest needs: build-boot-x86 name: test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.suite }} strategy: matrix: include: - os: debian suite: bullseye arch: i386 - os: debian suite: bookworm arch: i386 - os: debian suite: sid arch: i386 fail-fast: false env: DEBIAN_OS: ${{ matrix.os }} DEBIAN_ARCH: ${{ matrix.arch }} DEBIAN_SUITE: ${{ matrix.suite }} steps: - name: Install dependencies timeout-minutes: 5 env: DEBIAN_FRONTEND: noninteractive run: | sudo apt-get update sudo apt-get --assume-yes \ --no-install-recommends \ install bzip2 \ ca-certificates \ debian-archive-keyring \ debootstrap \ e2fsprogs \ pigz \ pwgen \ qemu-system-x86 \ ssh \ sshpass - name: Checkout uses: actions/checkout@v3 - name: Build ${{ matrix.suite }} ${{ matrix.arch }} timeout-minutes: 5 run: | sudo env PATH=$GITHUB_WORKSPACE/scripts:$PATH \ ARTIFACTS_DIR=$RUNNER_TEMP \ build-debian $DEBIAN_OS \ $DEBIAN_ARCH \ $DEBIAN_SUITE - uses: actions/download-artifact@v2 with: name: boot-qemu_x86_virt-master path: ${{ runner.temp }} - name: Test qemu_x86_virt + ${{ matrix.suite }} ${{ matrix.arch }} timeout-minutes: 5 run: | ./test/qemu.sh $RUNNER_TEMP/boot-qemu_x86_virt.bin.gz \ $RUNNER_TEMP/${{ matrix.os }}-${{ matrix.suite }}-${{ matrix.arch }}-*.bin.gz deploy-docker: runs-on: ubuntu-latest needs: test-debian-x86 name: deploy docker images steps: - name: Checkout uses: actions/checkout@v3 - name: Set up QEMU timeout-minutes: 1 uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx timeout-minutes: 1 uses: docker/setup-buildx-action@v1 - name: Build timeout-minutes: 30 uses: docker/build-push-action@v2 with: context: . platforms: linux/amd64,linux/arm64