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

Commit

Permalink
CI: add a simple github action
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed Oct 24, 2020
1 parent 937faff commit 20aef87
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 1 deletion.
69 changes: 69 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
on:
push:
branches: [master]
pull_request:

name: CI

jobs:
check:
runs-on: ubuntu-latest
container:
image: fedora:latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
- "1.40.0"
steps:
- run: sudo dnf install -y gcc gtk3-devel graphene-devel glib2-devel git xorg-x11-server-Xvfb
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1
name: "Docs"
with:
command: doc
- run: xvfb-run --auto-servernum cargo test
- uses: actions-rs/cargo@v1
name: "Build"
with:
command: build
- run: git diff -R --exit-code
- name: Cleanup xvfb pidx
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
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

checker:
name: gtk-rs checker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: gtk-rs/checker
ref: master
path: checker
- working-directory: checker
run: cargo build --release
- run: "./checker/target/release/checker ."
- run: "./checker/check_init_asserts"
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ members = [
"pangocairo/sys",
]

exclude = ["gir"]
exclude = ["gir", "checker"]

0 comments on commit 20aef87

Please sign in to comment.