Skip to content

Commit

Permalink
introduce CI/CD script for GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tamada committed Apr 14, 2024
1 parent 1a46efa commit 99ad3c8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: build
on:
push:
branches:
- "**"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Setup Rust LLVM coverage tools
run: |
rustup component add llvm-tools-preview
cargo install cargo-llvm-cov
- name: Checkout the project
uses: actions/checkout@v4

- name: Test & Build
run: |
cargo llvm-cov --lcov --output-path coverage.lcov
cargo build
- name: Send coverage to coveralls
uses: coverallsapp/github-action@master
if: matrix.os == 'ubuntu-latest'
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/*.lcov

### Generated by gibo (https://github.com/simonwhitaker/gibo)
### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Global/macOS.gitignore

Expand Down

0 comments on commit 99ad3c8

Please sign in to comment.