From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>, rcz@pengutronix.de
Subject: [PATCH 17/17] [RFC] test: run ./test/emulate.pl in Github action
Date: Mon, 12 Apr 2021 09:16:51 +0200 [thread overview]
Message-ID: <20210412071651.8769-18-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20210412071651.8769-1-a.fatoum@pengutronix.de>
See https://github.com/a3f/barebox/actions for an example how this could
look like.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
.github/workflows/build-configs.yaml | 41 ++++++++++++++++
.github/workflows/vm-tests.yaml | 71 ++++++++++++++++++++++++++++
.gitignore | 2 +
test/kconfig/no-deps.cfg | 3 ++
4 files changed, 117 insertions(+)
create mode 100644 .github/workflows/build-configs.yaml
create mode 100644 .github/workflows/vm-tests.yaml
create mode 100644 test/kconfig/no-deps.cfg
diff --git a/.github/workflows/build-configs.yaml b/.github/workflows/build-configs.yaml
new file mode 100644
index 000000000000..5025c2e04017
--- /dev/null
+++ b/.github/workflows/build-configs.yaml
@@ -0,0 +1,41 @@
+name: Build Configs
+on:
+ push:
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: ['ubuntu-latest' ]
+ ARCH: [ 'arm', 'mips', 'riscv' ]
+ name: ARCH=${{ matrix.ARCH }} Build
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Setup Environment
+ run: |
+ sudo apt-get update -qq
+ sudo apt-get install -y --no-install-recommends libyaml-tiny-perl \
+ lzop libusb-1.0-0-dev
+ pip3 install tuxmake
+
+ - name: Build Configs
+ run: |
+ for cfg in arch/${{ matrix.ARCH }}/configs/*_defconfig; do
+ cfg=$(basename $cfg)
+ DESTDIR="./artifacts/${{ matrix.ARCH }}-$cfg"
+ mkdir -p $DESTDIR
+ tuxmake -a "${{ matrix.ARCH }}" -k $cfg --runtime=podman -o $DESTDIR default \
+ --kconfig-add test/kconfig/no-deps.cfg
+ done
+
+ - name: Publish Build Artifacts
+ uses: actions/upload-artifact@v2
+ if: always()
+ with:
+ name: Build Logs
+ path: artifacts/
+ if-no-files-found: error
diff --git a/.github/workflows/vm-tests.yaml b/.github/workflows/vm-tests.yaml
new file mode 100644
index 000000000000..ac74dec5789b
--- /dev/null
+++ b/.github/workflows/vm-tests.yaml
@@ -0,0 +1,71 @@
+name: VM Tests
+on:
+ push:
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: ['ubuntu-latest' ]
+ ARCH: [ 'arm', 'mips', 'x86', 'riscv', 'openrisc' ]
+ name: ARCH=${{ matrix.ARCH }} Test
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Setup Environment
+ run: |
+ sudo apt-get update -qq
+ sudo apt-get install -y --no-install-recommends libyaml-tiny-perl \
+ qemu-system-arm qemu-system-mips qemu-system-x86 qemu-system-common qemu-system-misc
+ curl --remote-name --location \
+ http://ftp.us.debian.org/debian/pool/main/e/edk2/ovmf_2020.11-4_all.deb
+ sudo dpkg -i ovmf_2020.11-4_all.deb
+ pushd /tmp
+ git clone --depth 1 https://github.com/labgrid-project/labgrid
+ pushd labgrid
+ pip3 install -r requirements.txt
+ sudo python3 setup.py install
+ sudo ln -s $(which pytest) /usr/local/bin/labgrid-pytest
+ #pip3 install tuxmake
+ popd
+ git clone --depth 1 https://gitlab.com/a3f/tuxmake
+ cd tuxmake
+ python3 -m pip install flit
+ flit install
+ popd
+ sudo apt install lzop
+ if [ "${{ matrix.ARCH }}" = "openrisc" ]; then
+ curl --remote-name --location \
+ https://github.com/stffrdhrn/gcc/releases/download/or1k-10.0.0-20190723/or1k-linux-10.0.0-20190723.tar.xz
+ pushd /usr/local
+ sudo tar -xf $OLDPWD/or1k-linux-10.0.0-20190723.tar.xz --strip 1
+ popd
+ sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4
+ fi
+
+ - name: Build and Run Tests
+ run: |
+ NAME=${{ matrix.ARCH }}-{config}
+ OPTS="--kconfig-full --test -- --junitxml=$PWD/$NAME.tests.xml --lg-log=$PWD/log/$NAME"
+ if [ "${{ matrix.ARCH }}" != "openrisc" ]; then
+ OPTS="--runtime=podman $OPTS"
+ fi
+
+ ARCH=${{ matrix.ARCH }} ./test/emulate.pl $OPTS
+
+ - name: Publish Test Results
+ uses: EnricoMi/publish-unit-test-result-action@v1.11
+ if: always()
+ with:
+ files: ./*.tests.xml
+
+ - name: Publish Labgrid Log Results
+ uses: actions/upload-artifact@v2
+ if: always()
+ with:
+ name: Console Logs
+ path: log/
+ if-no-files-found: error
diff --git a/.gitignore b/.gitignore
index d7a37b3c9b39..ee67c725ba34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -88,3 +88,5 @@ GTAGS
/allrandom.config
/allyes.config
/compile_commands.json
+
+!.github/
diff --git a/test/kconfig/no-deps.cfg b/test/kconfig/no-deps.cfg
new file mode 100644
index 000000000000..98ffd398decc
--- /dev/null
+++ b/test/kconfig/no-deps.cfg
@@ -0,0 +1,3 @@
+# CONFIG_ARCH_IMX_USBLOADER is not set
+# CONFIG_OMAP3_USB_LOADER is not set
+# CONFIG_OMAP4_HOSTTOOL_USBBOOT is not set
--
2.29.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2021-04-12 7:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 7:16 [PATCH 00/17] add barebox in-tree testing infrastructure Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 01/17] kbuild: add install target Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 02/17] kbuild: add ARCH={i386, x86_64} as aliases for x86 Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 03/17] kbuild: add ARCH=um alias for sandbox Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 04/17] MIPS: qemu-malta: generate swapped image as part of multi-image build Ahmad Fatoum
2021-04-12 9:27 ` Jules Maselbas
2021-04-12 9:45 ` Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 05/17] MIPS: qemu-malta: replace board code with syscon-reboot Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 06/17] MIPS: configs: qemu-malta: enable Virt I/O Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 07/17] openrisc: set default KBUILD_IMAGE Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 08/17] Documentation: boards: RISC-V: update TinyEMU support Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 09/17] test: add basic barebox self-test infrastructure Ahmad Fatoum
2021-04-12 10:12 ` Jules Maselbas
2021-04-12 7:16 ` [PATCH 10/17] test: self: port Linux printf kselftest Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 11/17] test: add labgrid configs for some emulated targets Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 12/17] test: add first sample tests Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 13/17] test: support running labgrid-pytest from out-of-tree build directory Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 14/17] test: add emulate.pl, a runner for barebox on emulated targets Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 15/17] test: self: run selftests as part of the pytest suite Ahmad Fatoum
2021-04-12 7:16 ` [PATCH 16/17] test: add bthread test Ahmad Fatoum
2021-04-12 7:16 ` Ahmad Fatoum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210412071651.8769-18-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=rcz@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox