diff options
author | Alexander Larsson <alexl@redhat.com> | 2019-09-20 11:45:47 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2019-09-25 11:53:37 +0200 |
commit | 8911f8ac3143782cfcafb2c12986e15cf59695aa (patch) | |
tree | 581f27481271d1425caf44787158002c842b00d7 | |
parent | 0a3963b479bf8f37f35c618d80c4daf343239638 (diff) | |
download | flatpak-test-actions.tar.gz |
Use github actions for CItest-actions
-rw-r--r-- | .github/workflows/check.yml | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 00000000..ee103152 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,76 @@ +name: Flatpak CI + +on: [push] + +jobs: + check: + name: Build with gcc and test + runs-on: ubuntu-18.04 + steps: + - name: Install Dependencies + run: | + sudo add-apt-repository ppa:alexlarsson/flatpak + sudo add-apt-repository ppa:alexlarsson/glib260 + sudo apt-get update + sudo apt-get install -y libglib2.0 attr automake gettext autopoint bison dbus gtk-doc-tools \ + libfuse-dev ostree libostree-dev libarchive-dev libcap-dev libattr1-dev libdw-dev libelf-dev \ + libjson-glib-dev shared-mime-info desktop-file-utils libpolkit-agent-1-dev libpolkit-gobject-1-dev \ + libseccomp-dev libsoup2.4-dev libsystemd-dev libxml2-utils libgpgme11-dev gobject-introspection \ + libgirepository1.0-dev libappstream-glib-dev libdconf-dev clang + - name: Check out flatpak + uses: actions/checkout@v1 + with: + submodules: true + - name: Create logs dir + run: mkdir test-logs + - name: configure + # TODO: Enable gtk-doc builds + run: ./autogen.sh + env: + CFLAGS: -fsanitize=undefined -fsanitize-undefined-trap-on-error -fsanitize=address -O2 -Wp,-D_FORTIFY_SOURCE=2 + - name: Build flatpak + run: make -j $(getconf _NPROCESSORS_ONLN) + - name: Run tests + # TODO: Build with -j (currently ends up with hangs in the tests) + run: make --trace check + env: + ASAN_OPTIONS: detect_leaks=0 # Right now we're not fully clean, but this gets us use-after-free etc + - name: Collect overall test logs on failure + if: failure() + run: mv test-suite.log test-logs/ || true + - name: Collect individual test logs on cancel + if: cancelled() + run: mv tests/*.log test-logs/ || true + - name: Upload test logs + uses: actions/upload-artifact@v1 + if: failure() || cancelled() + with: + name: test logs + path: test-logs + + clang: + name: Build with clang + runs-on: ubuntu-18.04 + steps: + - name: Install Dependencies + run: | + sudo add-apt-repository ppa:alexlarsson/flatpak + sudo add-apt-repository ppa:alexlarsson/glib260 + sudo apt-get update + sudo apt-get install -y libglib2.0 attr automake gettext autopoint bison dbus gtk-doc-tools \ + libfuse-dev ostree libostree-dev libarchive-dev libcap-dev libattr1-dev libdw-dev libelf-dev \ + libjson-glib-dev shared-mime-info desktop-file-utils libpolkit-agent-1-dev libpolkit-gobject-1-dev \ + libseccomp-dev libsoup2.4-dev libsystemd-dev libxml2-utils libgpgme11-dev gobject-introspection \ + libgirepository1.0-dev libappstream-glib-dev libdconf-dev clang + - name: Check out flatpak + uses: actions/checkout@v1 + with: + submodules: true + - name: configure + # We disable introspection because it fails with clang: https://bugzilla.redhat.com/show_bug.cgi?id=1543295 + run: ./autogen.sh --disable-introspection + env: + CC: clang + CFLAGS: -Werror=unused-variable + - name: Build flatpak + run: make -j $(getconf _NPROCESSORS_ONLN) |