Skip to content

Commit

Permalink
Add compilation of minimal hello world example to CI
Browse files Browse the repository at this point in the history
This prevents issue #3 from re-occurring.
  • Loading branch information
Andlon committed Jan 13, 2021
1 parent ad7acf8 commit 366f138
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 40 deletions.
88 changes: 48 additions & 40 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,48 @@
name: Build and run tests

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master

jobs:
ubuntu:

name: Test on Ubuntu
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Update Rust
run: rustup update

- name: Run tests
run: cargo test --all-targets

windows:

name: Test on Windows
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Run tests
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cargo test --all-targets
shell: cmd

name: Build and run tests

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master

jobs:
ubuntu:

name: Test on Ubuntu
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Update Rust
run: rustup update

- name: Run tests
run: cargo test --all-targets

- name: Build matrixcompare-minimal
run: cargo build --manifest-path=matrixcompare-minimal/Cargo.toml

windows:

name: Test on Windows
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Run tests
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cargo test --all-targets
shell: cmd

- name: Build matrixcompare-minimal
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cargo build --manifest-path=matrixcompare-minimal/Cargo.toml
shell: cmd
8 changes: 8 additions & 0 deletions matrixcompare-minimal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See comment in src/main.rs for the purpose of this crate
[package]
name = "matrixcompare-minimal"
version = "0.1.0"
edition = "2018"

[dependencies]
matrixcompare = { version = "0.1.4", path = ".." }
8 changes: 8 additions & 0 deletions matrixcompare-minimal/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//! This "minimal" crate is just a means of testing in CI that the most barebones
//! example involving `matrixcompare` compiles. This is intended to prevent an issue like
//! that reported in [issue #3](https://github.com/Andlon/matrixcompare/issues/3) from
//! happening again.

fn main() {
println!("Hello, world!");
}

0 comments on commit 366f138

Please sign in to comment.