[go: up one dir, main page]

Documentation
name: Rust

on: [push, pull_request]

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        include:
          - name: Ubuntu
            os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
          - name: Windows
            os: windows-latest
            target: x86_64-pc-windows-msvc
          - name: macOS
            os: macos-latest
            target: x86_64-apple-darwin
          - name: WASM32
            os: ubuntu-latest
            target: wasm32-unknown-unknown

    name: ${{ matrix.name }}
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v2
    - name: "[Ubuntu] install dependencies"
      if: matrix.name == 'Ubuntu'
      run: sudo apt update && sudo apt install libgtk-3-dev
    - name: "[WASM] rustup"
      if: matrix.name == 'WASM32'
      run: rustup target add wasm32-unknown-unknown
    - uses: Swatinem/rust-cache@v1
    - name: Build
      run: cargo build --target ${{ matrix.target }}
    - name: Test
      # FIXME
      if: matrix.name != 'WASM32'
      run: cargo test --target ${{ matrix.target }}