Continuous Integration #281
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 0 1,15 * *" | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
rust: [stable, beta, nightly] | |
# "verbose" just means debug mode here, it's effectively a no-op flag | |
release: [verbose, release] | |
include: | |
- os: windows-latest | |
toolchain: -gnu | |
steps: | |
- uses: actions/checkout@v1 | |
# windows deps | |
- name: (Windows) Install Gtk build environment | |
if: matrix.os == 'windows-latest' | |
uses: msys2/setup-msys2@v2 | |
with: | |
path-type: inherit | |
install: > | |
mingw-w64-x86_64-gtk3 | |
mingw-w64-x86_64-toolchain | |
# lunix deps | |
- name: (Lunix) Install Gtk build environment | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev | |
# mac deps | |
- name: (macOS) Install Gtk build environment | |
if: matrix.os == 'macOS-latest' | |
run: | | |
brew install gtk+3 | |
# cargo away | |
- uses: hecrj/setup-rust-action@v1 | |
with: | |
rust-version: ${{ matrix.rust }}${{ matrix.toolchain }} | |
- name: (Cowindows) Build tree | |
if: matrix.os != 'windows-latest' | |
run: cargo build --all-features --verbose --verbose --${{ matrix.release }} | |
- name: (Windows) Build tree | |
if: matrix.os == 'windows-latest' | |
shell: msys2 {0} | |
run: cargo build --all-features --verbose --verbose --${{ matrix.release }} | |
- name: Run tests in macros | |
run: cd macros; cargo test --all-features --verbose --verbose --${{ matrix.release }} | |
- name: (Cowindows) Run tests in lib | |
if: matrix.os != 'windows-latest' | |
run: cd vgtk; cargo test --all-features --verbose --verbose --${{ matrix.release }} | |
- name: (Windows) Run tests in lib | |
if: matrix.os == 'windows-latest' | |
shell: msys2 {0} | |
run: cd vgtk; cargo test --all-features --verbose --verbose --${{ matrix.release }} | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Gtk build environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev | |
- uses: hecrj/setup-rust-action@v1 | |
with: | |
rust-version: stable | |
components: clippy | |
- uses: actions/checkout@v1 | |
- name: Clippy | |
run: cargo clippy -- -D warnings |