Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Adapt to addition of glib::Propagation - backport to 0.18 #1979

Adapt to addition of glib::Propagation - backport to 0.18

Adapt to addition of glib::Propagation - backport to 0.18 #1979

Workflow file for this run

on:
push:
branches: [master]
pull_request:
workflow_dispatch:
name: CI
jobs:
build:
name: ${{matrix.conf.name}} (rust ${{matrix.rust}})
runs-on: ubuntu-latest
container:
image: ghcr.io/gtk-rs/gtk3-rs/gtk3:latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
- "1.70.0"
conf:
- { name: "atk", features: "v2_34", test_sys: false } # disable for now, until we get 2.38 on the docker image
- { name: "gdk", features: "v3_24", test_sys: true }
- { name: "gdkx11", features: "v3_24", test_sys: true }
- { name: "gdkwayland", features: "v3_24", test_sys: false }
- { name: "gtk", features: "v3_24_9", test_sys: false }
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- uses: actions/checkout@v2
with:
repository: gtk-rs/checker
ref: master
path: checker
if: matrix.rust == 'nightly'
# nightly
# files checks
- run: cargo build --release
working-directory: checker
if: matrix.rust == 'nightly'
- run: cargo run --release -- ../${{matrix.conf.name}}
working-directory: checker
if: matrix.rust == 'nightly' && matrix.conf.name != 'gdkwayland'
- run: cargo run --release -- --no-license ../${{matrix.conf.name}}/sys
working-directory: checker
if: matrix.rust == 'nightly' && matrix.conf.name != 'gdkwayland'
- run: ./check_init_asserts ../${{matrix.conf.name}}
working-directory: checker
if: matrix.rust == 'nightly' && matrix.conf.name != 'gdkwayland'
- name: Check doc aliases
run: |
python3 doc_aliases.py ../${{matrix.conf.name}}
cd .. && git diff --exit-code
working-directory: checker
if: matrix.rust == 'nightly'
# tests run
- name: tests nightly
run: xvfb-run --auto-servernum cargo test --manifest-path ${{ matrix.conf.name }}/Cargo.toml --features "${{ matrix.conf.features }}"
if: matrix.rust == 'nightly'
- name: tests sys nightly
run: xvfb-run --auto-servernum cargo test --manifest-path ${{ matrix.conf.name }}/sys/Cargo.toml --features "${{ matrix.conf.features }}"
if: matrix.rust == 'nightly' && matrix.conf.test_sys
- name: build nightly
run: cargo build --manifest-path ${{ matrix.conf.name }}/Cargo.toml --features "${{ matrix.conf.features }}"
if: matrix.rust == 'nightly'
# not nightly
# clippy
- run: rustup component add clippy
if: matrix.rust == 'stable'
- working-directory: ${{ matrix.conf.name }}
name: clippy ${{ matrix.conf.name }}
run: cargo clippy --all-targets -- -D warnings
if: matrix.rust == 'stable'
# tests
- name: tests (rust ${{ matrix.rust }})
run: xvfb-run --auto-servernum cargo test --manifest-path ${{ matrix.conf.name }}/Cargo.toml --features "${{ matrix.conf.features }}"
if: matrix.rust != 'nightly'
- name: tests sys
run: xvfb-run --auto-servernum cargo test --manifest-path ${{ matrix.conf.name }}/sys/Cargo.toml --features "${{ matrix.conf.features }}"
if: matrix.rust != 'nightly' && matrix.conf.test_sys
- name: build
run: cargo build --manifest-path ${{ matrix.conf.name }}/Cargo.toml --features "${{ matrix.conf.features }}"
if: matrix.rust != 'nightly'
- uses: bcomnes/cleanup-xvfb@v1
build-others:
runs-on: ubuntu-latest
container:
image: ghcr.io/gtk-rs/gtk3-rs/gtk3:latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
- "1.70.0"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
# gtk3-macros
- name: "gtk3-macros: tests"
run: xvfb-run --auto-servernum cargo test --manifest-path gtk3-macros/Cargo.toml
- name: "gtk3-macros: build"
run: cargo build --manifest-path gtk3-macros/Cargo.toml
# examples
- name: "examples"
run: cargo build --manifest-path examples/Cargo.toml --bins --examples --all-features
- uses: bcomnes/cleanup-xvfb@v1
fmt:
name: rust fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
generator:
name: regen check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
set-safe-directory: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: git submodule update --checkout
- run: python3 generator.py
- run: git diff --exit-code