diff --git a/.github/workflows/block-autosquash-commits.yml b/.github/workflows/block-autosquash-commits.yml new file mode 100644 index 00000000..43d67717 --- /dev/null +++ b/.github/workflows/block-autosquash-commits.yml @@ -0,0 +1,15 @@ +on: pull_request + +name: Pull Requests + +jobs: + message-check: + name: Block Autosquash Commits + + runs-on: ubuntu-latest + + steps: + - name: Block Autosquash Commits + uses: xt0rted/block-autosquash-commits-action@v2.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 00000000..1b4a0972 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,69 @@ +name: Flatpak-builder CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +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 socat flatpak \ + libcurl4-gnutls-dev libflatpak-dev libyaml-dev elfutils git patch unzip + - name: Check out flatpak + uses: actions/checkout@v1 + with: + submodules: true + - 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 + run: make check + env: + ASAN_OPTIONS: detect_leaks=0 # Right now we're not fully clean, but this gets us use-after-free etc + + 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 flatpak \ + libcurl4-gnutls-dev libflatpak-dev libyaml-dev elfutils git patch unzip + - 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)