Initial workflow setup

This commit is contained in:
Ryan Kennedy 2020-03-12 12:48:28 -05:00
parent 2eec3c564c
commit 94b8cac780

View file

@ -3,11 +3,11 @@ name: Build
on: on:
push: push:
branches: branches:
- 'master' - "master"
tags: tags:
- '*' - "*"
schedule: schedule:
- cron: '40 4 * * *' # every day at 4:40 - cron: "40 4 * * *" # every day at 4:40
pull_request: pull_request:
jobs: jobs:
@ -16,13 +16,9 @@ jobs:
strategy: strategy:
matrix: matrix:
platform: [ os: [ubuntu-latest, macos-latest, windows-latest]
ubuntu-latest,
macos-latest,
windows-latest
]
runs-on: ${{ matrix.platform }} runs-on: ${{ matrix.os }}
timeout-minutes: 15 timeout-minutes: 15
steps: steps:
@ -51,8 +47,51 @@ jobs:
- name: "Run cargo doc" - name: "Run cargo doc"
run: cargo doc run: cargo doc
- name: 'Deny Warnings' - name: "Deny Warnings"
run: cargo rustc -- -D warnings run: cargo build --features deny-warnings
- name: "Install Rustup Targets"
run: rustup target add i686-unknown-linux-gnu
- name: "Build on non x86_64 platforms"
run: cargo build --target i686-unknown-linux-gnu
- name: "Install Rustup Components"
run: rustup component add rust-src llvm-tools-preview
- name: "Install cargo-xbuild"
run: cargo install cargo-xbuild --debug --root binaries
- name: "Install bootimage"
run: cargo install bootimage --debug --root binaries
- name: Install QEMU (Linux)
run: |
sudo apt update
sudo apt install qemu-system-x86
if: runner.os == 'Linux'
- name: Install QEMU (macOS)
run: brew install qemu
if: runner.os == 'macOS'
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
- name: Install Scoop (Windows)
run: |
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
echo ::add-path::$HOME\scoop\shims
if: runner.os == 'Windows'
shell: pwsh
- name: Install QEMU (Windows)
run: scoop install qemu
if: runner.os == 'Windows'
shell: pwsh
- name: "Print QEMU Version"
run: qemu-system-x86_64 --version
- name: "Run Test Framework"
run: cargo xtest
working-directory: "testing"
check_formatting: check_formatting:
name: "Check Formatting" name: "Check Formatting"
@ -62,3 +101,12 @@ jobs:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- run: rustup install nightly - run: rustup install nightly
- run: cargo +nightly fmt -- --check - run: cargo +nightly fmt -- --check
clippy:
name: "Clippy"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v1
- run: rustup install nightly
- run: cargo +nightly clippy -- -D warnings