Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split up github workflows #752

Merged
merged 12 commits into from
Nov 24, 2022
157 changes: 0 additions & 157 deletions .github/workflows/ci.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "ci-fmt"
on:
pull_request:
push:
branches:
- master
- main
- staging # for Bors
- trying # for Bors
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- name: checkout_repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal

- name: install_rustfmt
run: rustup component add rustfmt

- name: check_formatting
run: |
cargo fmt -- --check
22 changes: 22 additions & 0 deletions .github/workflows/licenses_and_advisories.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "ci-licenses_and_advisories"
on:
pull_request:
push:
branches:
- master
- main
- staging # for Bors
- trying # for Bors
jobs:
licenses_and_advisories:
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources

continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
36 changes: 36 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "ci-linter"
on:
pull_request:
push:
branches:
- master
- main
- staging # for Bors
- trying # for Bors
jobs:
linter:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: checkout_repo
uses: actions/checkout@v3

- name: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: clippy

- name: check_with_clippy_backend_pixels
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --no-default-features --features backend_pixels -- -D warnings

- name: check_with_clippy_backend_piston_window
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --no-default-features --features backend_piston_window -- -D warnings
38 changes: 38 additions & 0 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "ci-msrv"
on:
pull_request:
push:
branches:
- master
- main
- staging # for Bors
- trying # for Bors
schedule:
- cron: '00 04,14 * * *'
jobs:
msrv:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: checkout_repo
uses: actions/checkout@v2

- name: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal

- name: install_cargo_msrv
run: cargo install cargo-msrv --no-default-features

- name: version_of_cargo_msrv
run: cargo msrv --version

- name: run_cargo_msrv
run: cargo msrv --output-format json verify -- cargo check

- name: run_cargo_msrv_on_verify_failure
if: ${{ failure() }}
run: cargo msrv --output-format json -- cargo check
82 changes: 82 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# GitHub Actions workflow: CI for miniview
# --
# Based on GitHub Actions workflow: CI for sic: https://github.com/foresterre/sic/blob/dc589e2b3014e27038d450d1ae99e5251c68247b/.github/workflows/ci.yml
# which is licensed under the MIT license: https://github.com/foresterre/sic/blob/dc589e2b3014e27038d450d1ae99e5251c68247b/LICENSE
# --
# originally based on: https://github.com/BurntSushi/bstr/blob/master/.github/workflows/ci.yml
# which is licensed under Apache License, Version 2.0 or MIT license
# --
# based on Actions workflow for is

name: "ci-test"
on:
pull_request:
push:
branches:
- master
- main
- staging # for Bors
- trying # for Bors
schedule:
- cron: '00 06 * * *'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build: [stable, beta, nightly, win-gnu, win-msvc]
include:
# latest rust stable :: ubuntu
- build: stable
os: ubuntu-latest
rust: stable

# latest rust beta :: ubuntu
- build: beta
os: ubuntu-latest
rust: beta

# latest rust nightly :: ubuntu
- build: nightly
os: ubuntu-latest
rust: nightly

# latest rust stable :: windows + gnu
- build: win-gnu
os: windows-latest
rust: stable-x86_64-gnu

# latest rust stable :: windows + msvc
- build: win-msvc
os: windows-latest
rust: stable

steps:
- name: checkout_repo
uses: actions/checkout@v2

- name: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
profile: minimal

# backend: pixels

- name: build_backend_pixels
run: cargo build --verbose --no-default-features --features backend_pixels

# we do not test on the CI because it does not have a compositor
# - name: test_backend_pixels
# run: cargo test --verbose --no-default-features --features backend_pixels

# backend: piston_window

- name: build_backend_piston_window
run: cargo build --verbose --no-default-features --features backend_piston_window

# we do not test on the CI because it does not have a compositor
# - name: test_backend_piston_window
# run: cargo test --verbose --no-default-features --features backend_piston_window