102 lines
2.9 KiB
YAML
102 lines
2.9 KiB
YAML
name: Continuous integration
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- 'explorer/**'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'explorer/**'
|
|
|
|
jobs:
|
|
matrix_prep:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
# creates the matrix strategy from build_matrix_includes.json
|
|
- uses: actions/checkout@v2
|
|
- id: set-matrix
|
|
uses: JoshuaTheMiller/conditional-build-matrix@main
|
|
with:
|
|
inputFile: '.github/workflows/build_matrix_includes.json'
|
|
filter: '[?runOnEvent==`${{ github.event_name }}` || runOnEvent==`always`]'
|
|
build:
|
|
needs: matrix_prep
|
|
strategy:
|
|
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
|
|
runs-on: ${{ matrix.os }}
|
|
continue-on-error: ${{ matrix.rust == 'nightly' || matrix.rust == 'beta' || matrix.os == 'windows-latest' }}
|
|
steps:
|
|
- name: Install Dependencies (Linux)
|
|
run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install rust toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
components: rustfmt, clippy
|
|
|
|
- name: Build all binaries
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --all
|
|
|
|
- name: Run all tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --all
|
|
|
|
- name: Check formatting
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
- uses: actions-rs/clippy-check@v1
|
|
name: Clippy checks
|
|
# if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --all-features
|
|
|
|
- name: Run clippy
|
|
uses: actions-rs/cargo@v1
|
|
if: ${{ matrix.rust != 'nightly' }}
|
|
with:
|
|
command: clippy
|
|
args: -- -D warnings
|
|
|
|
# COCONUT stuff
|
|
- name: Reclaim some disk space (because Windows is being annoying)
|
|
uses: actions-rs/cargo@v1
|
|
if: ${{ matrix.os == 'windows-latest' }}
|
|
with:
|
|
command: clean
|
|
|
|
- name: Build all binaries with coconut enabled
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --all --features=coconut
|
|
|
|
- name: Run all tests with coconut enabled
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --all --features=coconut
|
|
|
|
- name: Run clippy with coconut enabled
|
|
uses: actions-rs/cargo@v1
|
|
if: ${{ matrix.rust != 'nightly' }}
|
|
with:
|
|
command: clippy
|
|
args: --features=coconut -- -D warnings |