From 87180d0018013d4830f8758e44af56236403c509 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Sun, 27 Aug 2023 15:50:25 +0200 Subject: [PATCH] CI: reformat yaml files --- .github/workflows/CI.yml | 18 ++- .github/workflows/image.yml | 2 +- .github/workflows/macos.yml | 48 ++++---- .github/workflows/windows-msvc.yml | 180 ++++++++++++++--------------- 4 files changed, 130 insertions(+), 118 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f1774943da43..8012e1861b5e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -41,12 +41,24 @@ jobs: - nightly - "1.70" conf: - - { name: "gtk4", features: "v4_14,xml_validation,blueprint", test_sys: false } + - { + name: "gtk4", + features: "v4_14,xml_validation,blueprint", + test_sys: false, + } - { name: "gsk4", features: "v4_14,broadway", test_sys: true } - { name: "gdk4", features: "v4_12,gl", test_sys: true } - - { name: "gdk4-wayland", features: "v4_12,wayland_crate,egl,xkb_crate", test_sys: true } + - { + name: "gdk4-wayland", + features: "v4_12,wayland_crate,egl,xkb_crate", + test_sys: true, + } - { name: "gdk4-x11", features: "v4_4,xlib,egl", test_sys: false } - - { name: "gtk4-macros", features: "xml_validation,blueprint", test_sys: false } + - { + name: "gtk4-macros", + features: "xml_validation,blueprint", + test_sys: false, + } steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index d98ef857f777..d4b4b3acff7a 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -3,7 +3,7 @@ name: github packages on: # Rebuild the container once every week schedule: - - cron: '0 1 * * 1' + - cron: "0 1 * * 1" push: branches: - "master" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 7b6c848d212f..87449aad7231 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -21,31 +21,31 @@ on: jobs: ci-macos: name: macOS - runs-on: macos-12 + runs-on: macos-12 steps: - - uses: actions/checkout@v3 - - - name: Install GTK - run: | - brew install gtk4 - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - components: clippy - - - name: Build - uses: actions-rs/cargo@v1 - with: - command: build - args: --features v4_10,xml_validation --manifest-path ./gtk4/Cargo.toml - - name: Clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --features v4_8,xml_validation --manifest-path ./gtk4/Cargo.toml + - uses: actions/checkout@v3 + + - name: Install GTK + run: | + brew install gtk4 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: clippy + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --features v4_10,xml_validation --manifest-path ./gtk4/Cargo.toml + - name: Clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --features v4_8,xml_validation --manifest-path ./gtk4/Cargo.toml # FIXME: renable once https://github.com/gtk-rs/gtk4-rs/issues/1235 is fixed #- name: Tests # uses: actions-rs/cargo@v1 diff --git a/.github/workflows/windows-msvc.yml b/.github/workflows/windows-msvc.yml index 7b1c8e2b9592..b9670dc470e7 100644 --- a/.github/workflows/windows-msvc.yml +++ b/.github/workflows/windows-msvc.yml @@ -28,96 +28,96 @@ jobs: PKG_CONFIG_PATH: 'C:\gnome\lib\pkgconfig' steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - id: cache - with: - path: c:/gnome - key: ${{ runner.os }}-gtk4-14.2 - restore-keys: | - ${{ runner.os }}-gtk4-14.2 - - - name: Set up the PATH environment - run: | - echo "C:\pkg-config-lite-0.28-1\bin" >> $GITHUB_PATH - echo "C:\gnome\bin" >> $GITHUB_PATH - shell: bash - - - name: Install pkgconfig-lite - run: | - Invoke-WebRequest -Uri https://deac-fra.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip -OutFile /pkg_config_lite.zip -MaximumRetryCount 5 - Expand-Archive /pkg_config_lite.zip -DestinationPath C:\ - ls C:\ - ls C:\pkg-config-lite-0.28-1 - ls C:\pkg-config-lite-0.28-1\bin - pkg-config --version + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + id: cache + with: + path: c:/gnome + key: ${{ runner.os }}-gtk4-14.2 + restore-keys: | + ${{ runner.os }}-gtk4-14.2 - - name: Clone GTK - working-directory: / - if: steps.cache.outputs.cache-hit != 'true' - run: | - git clone https://gitlab.gnome.org/GNOME/gtk.git --depth 1 - - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - - name: Install Python Dependencies - run: pip install meson ninja - - - name: Setup MSVC - uses: bus1/cabuild/action/msdevshell@v1 - with: - architecture: x64 - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - components: clippy - - - name: Prepare GTK build - working-directory: /gtk - if: steps.cache.outputs.cache-hit != 'true' - run: | - meson setup builddir --prefix=C:/gnome -Dbackend_max_links=1 -Ddemos=false -Dbuild-tests=false -Dmedia-gstreamer=disabled -Dbuild-examples=false -Dglib:tests=false -Dharfbuzz:tests=disabled -Dharfbuzz:docs=disabled -Dgraphene:tests=false -Dgdk-pixbuf:tests=false -Dcairo:tests=disabled - - - name: Build and install GTK - working-directory: /gtk - if: steps.cache.outputs.cache-hit != 'true' - run: | - meson install -C builddir + - name: Set up the PATH environment + run: | + echo "C:\pkg-config-lite-0.28-1\bin" >> $GITHUB_PATH + echo "C:\gnome\bin" >> $GITHUB_PATH + shell: bash - - name: Build - uses: actions-rs/cargo@v1 - with: - command: build - args: --features v4_14,xml_validation - - name: Clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --features v4_14,xml_validation - - name: Tests - uses: actions-rs/cargo@v1 - with: - command: test - args: --features v4_14,xml_validation + - name: Install pkgconfig-lite + run: | + Invoke-WebRequest -Uri https://deac-fra.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip -OutFile /pkg_config_lite.zip -MaximumRetryCount 5 + Expand-Archive /pkg_config_lite.zip -DestinationPath C:\ + ls C:\ + ls C:\pkg-config-lite-0.28-1 + ls C:\pkg-config-lite-0.28-1\bin + pkg-config --version - - name: Build gdk-win32 - uses: actions-rs/cargo@v1 - with: - command: build - args: --features egl,win32 --manifest-path ./gdk4-win32/Cargo.toml - - name: Clippy gdk-win32 - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --features egl,win32 --manifest-path ./gdk4-win32/Cargo.toml - - name: Tests gdk-win32 - uses: actions-rs/cargo@v1 - with: - command: test - args: --features egl,win32 --manifest-path ./gdk4-win32/Cargo.toml + - name: Clone GTK + working-directory: / + if: steps.cache.outputs.cache-hit != 'true' + run: | + git clone https://gitlab.gnome.org/GNOME/gtk.git --depth 1 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + + - name: Install Python Dependencies + run: pip install meson ninja + + - name: Setup MSVC + uses: bus1/cabuild/action/msdevshell@v1 + with: + architecture: x64 + + - name: Prepare GTK build + working-directory: /gtk + if: steps.cache.outputs.cache-hit != 'true' + run: | + meson setup builddir --prefix=C:/gnome -Dbackend_max_links=1 -Ddemos=false -Dbuild-tests=false -Dmedia-gstreamer=disabled -Dbuild-examples=false -Dglib:tests=false -Dharfbuzz:tests=disabled -Dharfbuzz:docs=disabled -Dgraphene:tests=false -Dgdk-pixbuf:tests=false -Dcairo:tests=disabled + + - name: Build and install GTK + working-directory: /gtk + if: steps.cache.outputs.cache-hit != 'true' + run: | + meson install -C builddir + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: clippy + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --features v4_14,xml_validation + - name: Clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --features v4_14,xml_validation + - name: Tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --features v4_14,xml_validation + + - name: Build gdk-win32 + uses: actions-rs/cargo@v1 + with: + command: build + args: --features egl,win32 --manifest-path ./gdk4-win32/Cargo.toml + - name: Clippy gdk-win32 + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --features egl,win32 --manifest-path ./gdk4-win32/Cargo.toml + - name: Tests gdk-win32 + uses: actions-rs/cargo@v1 + with: + command: test + args: --features egl,win32 --manifest-path ./gdk4-win32/Cargo.toml