Skip to content

Merge pull request #5 from chakanysystems/fix-event-verification #7

Merge pull request #5 from chakanysystems/fix-event-verification

Merge pull request #5 from chakanysystems/fix-event-verification #7

Workflow file for this run

name: Rust CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
cross-compile:
runs-on: ${{ matrix.host }}
strategy:
matrix:
include:
- host: ubuntu-latest
target: x86_64-pc-windows-gnu
- host: macOS-latest
target: x86_64-unknown-linux-gnu
- host: macOS-latest
target: x86_64-pc-windows-gnu
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Install dependencies
run: |
if [ "${{ matrix.host }}" = "ubuntu-latest" ]; then
sudo apt-get update
sudo apt-get install -y mingw-w64
elif [ "${{ matrix.host }}" = "macOS-latest" ]; then
brew install mingw-w64
fi
- name: Cross-compile
run: cargo build --verbose --target ${{ matrix.target }}