diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 547bbc7..5148918 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,83 +1,83 @@ name: Continuous integration build on: - push: - branches: [ master ] - pull_request: - branches: [ master ] + push: + branches: [master] + pull_request: + branches: [master] env: - WLROOTS_VERSION: "0.20" - ALPINE_PACKAGES: "build-base xcb-util-wm-dev libseat-dev clang git eudev-dev mesa-dev libdrm-dev libinput-dev libxkbcommon-dev pixman-dev wayland-dev meson wayland-protocols xwayland-dev scdoc-doc hwdata libdisplay-info-dev" - ARCHLINUX_PACKAGES: "xcb-util-wm seatd git clang meson libinput libdrm mesa libxkbcommon wayland wayland-protocols xorg-server-xwayland scdoc libdisplay-info" + WLROOTS_VERSION: "0.20" + ALPINE_PACKAGES: "build-base xcb-util-wm-dev libseat-dev clang git eudev-dev mesa-dev libdrm-dev libinput-dev libxkbcommon-dev pixman-dev wayland-dev meson wayland-protocols xwayland-dev scdoc-doc hwdata libdisplay-info-dev" + ARCHLINUX_PACKAGES: "xcb-util-wm seatd git clang meson libinput libdrm mesa libxkbcommon wayland wayland-protocols xorg-server-xwayland scdoc libdisplay-info" jobs: - compile: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - CC: [ gcc, clang ] - OS: [ "alpine:edge", "archlinux:base-devel" ] - xwayland: [ enabled, disabled ] - container: ${{ matrix.OS }} - env: - CC: ${{ matrix.CC }} - steps: - - name: Checkout Cage - uses: actions/checkout@v2 + compile: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + CC: [gcc, clang] + OS: ["alpine:edge", "archlinux:base-devel"] + xwayland: [enabled, disabled] + container: ${{ matrix.OS }} + env: + CC: ${{ matrix.CC }} + steps: + - name: Checkout Cage + uses: actions/checkout@v4 - - name: Install dependencies (Alpine) - if: "matrix.OS == 'alpine:edge'" - run: apk add $ALPINE_PACKAGES + - name: Install dependencies (Alpine) + if: "matrix.OS == 'alpine:edge'" + run: apk add $ALPINE_PACKAGES - - name: Install dependencies (Arch) - if: "matrix.OS == 'archlinux:base-devel'" - run: | - pacman-key --init - pacman -Syu --noconfirm $ARCHLINUX_PACKAGES + - name: Install dependencies (Arch) + if: "matrix.OS == 'archlinux:base-devel'" + run: | + pacman-key --init + pacman -Syu --noconfirm $ARCHLINUX_PACKAGES - - name: Fetch wlroots as a subproject - run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b $WLROOTS_VERSION + - name: Fetch wlroots as a subproject + run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b $WLROOTS_VERSION - - name: Compile Cage (XWayland=${{ matrix.xwayland }}) - run: | - meson setup --fatal-meson-warnings --wrap-mode=nodownload \ - build-${{ matrix.CC }}-${{matrix.xwayland }} \ - -Dwlroots:xwayland=${{ matrix.xwayland }} - ninja -C build-${{ matrix.CC }}-${{matrix.xwayland }} + - name: Compile Cage (XWayland=${{ matrix.xwayland }}) + run: | + meson setup --fatal-meson-warnings --wrap-mode=nodownload \ + build-${{ matrix.CC }}-${{matrix.xwayland }} \ + -Dwlroots:xwayland=${{ matrix.xwayland }} + ninja -C build-${{ matrix.CC }}-${{matrix.xwayland }} - format: - runs-on: ubuntu-latest - container: "archlinux:base-devel" - steps: - - name: Checkout Cage - uses: actions/checkout@v2 - - name: Install dependencies - run: | - pacman-key --init - pacman -Syu --noconfirm $ARCHLINUX_PACKAGES - - name: Fetch wlroots as a subproject - run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b $WLROOTS_VERSION - - name: Check for formatting changes - run: | - meson setup --wrap-mode=nodownload build-clang-format -Dwlroots:xwayland=enabled - ninja -C build-clang-format clang-format-check + format: + runs-on: ubuntu-latest + container: "archlinux:base-devel" + steps: + - name: Checkout Cage + uses: actions/checkout@v4 + - name: Install dependencies + run: | + pacman-key --init + pacman -Syu --noconfirm $ARCHLINUX_PACKAGES + - name: Fetch wlroots as a subproject + run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b $WLROOTS_VERSION + - name: Check for formatting changes + run: | + meson setup --wrap-mode=nodownload build-clang-format -Dwlroots:xwayland=enabled + ninja -C build-clang-format clang-format-check - scan-build: - runs-on: ubuntu-latest - container: "archlinux:base-devel" - env: - CC: clang - steps: - - name: Checkout Cage - uses: actions/checkout@v2 - - name: Install dependencies - run: | - pacman-key --init - pacman -Syu --noconfirm $ARCHLINUX_PACKAGES - - name: Fetch wlroots as a subproject - run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b $WLROOTS_VERSION - - name: Run scan-build - run: | - meson setup --wrap-mode=nodownload build-scan-build -Dwlroots:xwayland=enabled - ninja -C build-scan-build scan-build + scan-build: + runs-on: ubuntu-latest + container: "archlinux:base-devel" + env: + CC: clang + steps: + - name: Checkout Cage + uses: actions/checkout@v4 + - name: Install dependencies + run: | + pacman-key --init + pacman -Syu --noconfirm $ARCHLINUX_PACKAGES + - name: Fetch wlroots as a subproject + run: git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots -b $WLROOTS_VERSION + - name: Run scan-build + run: | + meson setup --wrap-mode=nodownload build-scan-build -Dwlroots:xwayland=enabled + ninja -C build-scan-build scan-build