Skip to content

Switch CI to Github Actions #79

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

Merged
merged 6 commits into from
Jul 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/bors.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
block_labels = ["needs-decision"]
delete_merged_branches = true
required_approvals = 1
status = ["continuous-integration/travis-ci/push"]
status = [
"ci-linux (stable)",
"ci-linux (1.42.0)",
"build-other (macOS-latest)",
"build-other (windows-latest)",
"Rustfmt"
]
61 changes: 61 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
on:
push:
branches: [ staging, trying, master ]
pull_request:

name: Continuous integration

jobs:
ci-linux:
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.experimental || false }}
strategy:
matrix:
# All generated code should be running on stable now, MRSV is 1.42.0
rust: [nightly, stable, 1.42.0]

include:
# Nightly is only for reference and allowed to fail
- rust: nightly
experimental: true

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Install all Rust targets for ${{ matrix.rust }}
run: rustup target install --toolchain=${{ matrix.rust }} x86_64-unknown-linux-gnu riscv32imac-unknown-none-elf riscv64imac-unknown-none-elf riscv64gc-unknown-none-elf
- name: Install riscv gcc
run: sudo apt-get update && sudo apt-get install -y gcc-riscv64-unknown-elf
- name: Run CI script for x86_64-unknown-linux-gnu under ${{ matrix.rust }}
run: TARGET=x86_64-unknown-linux-gnu cargo check
- name: Run CI script for riscv32imac-unknown-none-elf under ${{ matrix.rust }}
run: TARGET=riscv32imac-unknown-none-elf cargo check
- name: Run CI script for riscv64imac-unknown-none-elf under ${{ matrix.rust }}
run: TARGET=riscv64imac-unknown-none-elf cargo check
- name: Run CI script for riscv64gc-unknown-none-elf under ${{ matrix.rust }}
run: TARGET=riscv64gc-unknown-none-elf cargo check
- name: Check blobs
run: ./check-blobs.sh

# On macOS and Windows, we at least make sure that the crate builds and links.
build-other:
strategy:
matrix:
os:
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Build crate for host OS
run: cargo build
24 changes: 24 additions & 0 deletions .github/workflows/rustfmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

on:
push:
branches: [ staging, trying, master ]
pull_request:

name: Code formatting check

jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.