|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: [master] |
| 4 | + pull_request: |
| 5 | + |
| 6 | +name: CI |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + container: |
| 12 | + image: ubuntu:20.10 |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + rust: |
| 16 | + - stable |
| 17 | + - beta |
| 18 | + - nightly |
| 19 | + - "1.40.0" |
| 20 | + steps: |
| 21 | + - run: apt-get update -y |
| 22 | + - run: apt-get install -y libgtk-3-dev libglib2.0-dev libgraphene-1.0-dev git xvfb curl libcairo-gobject2 libcairo2-dev |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + - uses: actions-rs/toolchain@v1 |
| 25 | + with: |
| 26 | + toolchain: ${{ matrix.rust }} |
| 27 | + override: true |
| 28 | + # atk |
| 29 | + - name: "atk: tests" |
| 30 | + run: xvfb-run --auto-servernum cargo test --manifest-path atk/Cargo.toml --all-features |
| 31 | + - name: "atk-sys: tests" |
| 32 | + run: xvfb-run --auto-servernum cargo test --manifest-path atk/sys/Cargo.toml --all-features |
| 33 | + - name: "atk: build" |
| 34 | + run: cargo build --manifest-path atk/Cargo.toml --all-features |
| 35 | + # cairo |
| 36 | + - name: "cairo: tests" |
| 37 | + run: xvfb-run --auto-servernum cargo test --manifest-path cairo/Cargo.toml --features "png,pdf,svg,ps,use_glib,v1_16,freetype,script,xcb,xlib,win32-surface" |
| 38 | + - name: "cairo-sys: tests" |
| 39 | + run: xvfb-run --auto-servernum cargo test --manifest-path cairo/sys/Cargo.toml --features "png,pdf,svg,ps,use_glib,v1_16,freetype,script,xcb,xlib,win32-surface" |
| 40 | + - name: "cairo: build" |
| 41 | + run: cargo build --manifest-path cairo/Cargo.toml --features "png,pdf,svg,ps,use_glib,v1_16,freetype,script,xcb,xlib,win32-surface" |
| 42 | + # gdk |
| 43 | + - name: "gdk: tests" |
| 44 | + run: xvfb-run --auto-servernum cargo test --manifest-path gdk/Cargo.toml --features v3_24 |
| 45 | + - name: "gdk: build" |
| 46 | + run: cargo build --manifest-path gdk/Cargo.toml --features v3_24 |
| 47 | + # gdk-pixbuf |
| 48 | + - name: "gdk-pixbuf: tests" |
| 49 | + run: xvfb-run --auto-servernum cargo test --manifest-path gdk-pixbuf/Cargo.toml --all-features |
| 50 | + - name: "gdk-pixbuf-sys: tests" |
| 51 | + run: xvfb-run --auto-servernum cargo test --manifest-path gdk-pixbuf/sys/Cargo.toml --all-features |
| 52 | + - name: "gdk-pixbuf: build" |
| 53 | + run: cargo build --manifest-path gdk-pixbuf/Cargo.toml --all-features |
| 54 | + # gdkx11 |
| 55 | + - name: "gdkx11: tests" |
| 56 | + run: xvfb-run --auto-servernum cargo test --manifest-path gdkx11/Cargo.toml --all-features |
| 57 | + - name: "gdkx11-sys: tests" |
| 58 | + run: xvfb-run --auto-servernum cargo test --manifest-path gdkx11/sys/Cargo.toml --all-features |
| 59 | + - name: "gdkx11: build" |
| 60 | + run: cargo build --manifest-path gdkx11/Cargo.toml --all-features |
| 61 | + # gio |
| 62 | + - name: "gio: tests" |
| 63 | + run: xvfb-run --auto-servernum cargo test --manifest-path gio/Cargo.toml --all-features |
| 64 | + - name: "gio: build" |
| 65 | + run: cargo build --manifest-path gio/Cargo.toml --all-features |
| 66 | + # glib |
| 67 | + - name: "glib: tests" |
| 68 | + run: xvfb-run --auto-servernum cargo test --manifest-path glib/Cargo.toml --all-features |
| 69 | + - name: "glib: build" |
| 70 | + run: cargo build --manifest-path glib/Cargo.toml --all-features |
| 71 | + # glib-macros |
| 72 | + - name: "glib-macros: tests" |
| 73 | + run: xvfb-run --auto-servernum cargo test --manifest-path glib-macros/Cargo.toml |
| 74 | + - name: "glib-macros: build" |
| 75 | + run: cargo build --manifest-path glib-macros/Cargo.toml |
| 76 | + # graphene |
| 77 | + - name: "graphene: tests" |
| 78 | + run: xvfb-run --auto-servernum cargo test --manifest-path graphene/Cargo.toml --all-features |
| 79 | + - name: "graphene: build" |
| 80 | + run: cargo build --manifest-path graphene/Cargo.toml --all-features |
| 81 | + # gtk |
| 82 | + - name: "gtk: tests" |
| 83 | + run: xvfb-run --auto-servernum cargo test --manifest-path gtk/Cargo.toml --all-features |
| 84 | + - name: "gtk: build" |
| 85 | + run: cargo build --manifest-path gtk/Cargo.toml --all-features |
| 86 | + # pango |
| 87 | + - name: "pango: tests" |
| 88 | + run: xvfb-run --auto-servernum cargo test --manifest-path pango/Cargo.toml --all-features |
| 89 | + - name: "pango-sys: tests" |
| 90 | + run: xvfb-run --auto-servernum cargo test --manifest-path pango/sys/Cargo.toml --all-features |
| 91 | + - name: "pango: build" |
| 92 | + run: cargo build --manifest-path pango/Cargo.toml --all-features |
| 93 | + # pangocairo |
| 94 | + - name: "pangocairo: tests" |
| 95 | + run: xvfb-run --auto-servernum cargo test --manifest-path pangocairo/Cargo.toml --all-features |
| 96 | + - name: "pangocairo-sys: tests" |
| 97 | + run: xvfb-run --auto-servernum cargo test --manifest-path pangocairo/sys/Cargo.toml --all-features |
| 98 | + - name: "pangocairo: build" |
| 99 | + run: cargo build --manifest-path pangocairo/Cargo.toml --all-features |
| 100 | + # examples |
| 101 | + - name: "examples" |
| 102 | + run: cargo build --manifest-path examples/Cargo.toml --bins --examples --all-features |
| 103 | + |
| 104 | + - run: git diff -R --exit-code |
| 105 | + - uses: bcomnes/cleanup-xvfb@v1 |
| 106 | + |
| 107 | + fmt: |
| 108 | + name: rust fmt |
| 109 | + runs-on: ubuntu-latest |
| 110 | + steps: |
| 111 | + - uses: actions/checkout@v2 |
| 112 | + - uses: actions-rs/toolchain@v1 |
| 113 | + with: |
| 114 | + profile: minimal |
| 115 | + toolchain: stable |
| 116 | + override: true |
| 117 | + - run: rustup component add rustfmt |
| 118 | + - uses: actions-rs/cargo@v1 |
| 119 | + with: |
| 120 | + command: fmt |
| 121 | + args: --all -- --check |
| 122 | + |
| 123 | + checker: |
| 124 | + name: gtk-rs checker |
| 125 | + runs-on: ubuntu-latest |
| 126 | + steps: |
| 127 | + - uses: actions/checkout@v2 |
| 128 | + with: |
| 129 | + repository: gtk-rs/checker |
| 130 | + ref: master |
| 131 | + path: checker |
| 132 | + - working-directory: checker |
| 133 | + run: cargo build --release |
| 134 | + - run: "./checker/target/release/checker ." |
| 135 | + - run: "./checker/check_init_asserts" |
0 commit comments