Skip to content

Commit 8f7ade8

Browse files
authored
Merge pull request #126 from Enselic/basic-github-actions-port
Port basics of .travis.yml to GitHub Actions
2 parents a0824eb + 238e8b3 commit 8f7ade8

File tree

3 files changed

+42
-32
lines changed

3 files changed

+42
-32
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
branches: [ master ]
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
build:
15+
name: ${{ matrix.rust }}
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
rust:
21+
- 1.30.0
22+
- stable
23+
- beta
24+
- nightly
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: actions-rs/toolchain@v1
28+
with:
29+
toolchain: ${{ matrix.rust }}
30+
default: true
31+
profile: minimal
32+
- run: rustup component add rustfmt-preview
33+
- name: cargo fmt --all -- --check if stable
34+
run: |
35+
if [ "${{ matrix.rust }}" = "stable" ]; then
36+
cargo fmt --all -- --check
37+
fi
38+
- run: |
39+
cargo build --verbose
40+
- run: |
41+
cargo test --verbose

.travis.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pkg-config-rs
22

3-
[![Build Status](https://travis-ci.com/rust-lang/pkg-config-rs.svg?branch=master)](https://travis-ci.com/rust-lang/pkg-config-rs)
3+
[![Build Status](https://github.com/rust-lang/pkg-config-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/rust-lang/pkg-config-rs/actions)
44
[![Rust](https://img.shields.io/badge/rust-1.30%2B-blue.svg?maxAge=3600)](https://github.com/rust-lang/pkg-config-rs/)
55

66
[Documentation](https://docs.rs/pkg-config)

0 commit comments

Comments
 (0)