Skip to content

Merge InvArch into main and restructure workspace #366

Merge InvArch into main and restructure workspace

Merge InvArch into main and restructure workspace #366

Workflow file for this run

name: Checks
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- '.github/workflows/build.yml'
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
with:
fetch_depth: 0
dir_names: true
dir_names_max_depth: 1
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
- name: Setup for checks
if:
contains(steps.changed-files.outputs.all_modified_files, 'tinkernet') || contains(steps.changed-files.outputs.all_modified_files, 'invarch')
run: sudo apt install -y git clang curl libssl-dev llvm libudev-dev protobuf-compiler
- name: Build [tinkernet]
if:
contains(steps.changed-files.outputs.all_modified_files, 'tinkernet')
working-directory: ./tinkernet
run: cargo build --verbose
- name: Run tests [tinkernet]
if:
contains(steps.changed-files.outputs.all_modified_files, 'tinkernet')
working-directory: ./tinkernet
run: cargo test --verbose
- name: Run clippy [tinkernet]
if:
contains(steps.changed-files.outputs.all_modified_files, 'tinkernet')
working-directory: ./tinkernet
run: cargo clippy -- -D warnings
- name: Run cargofmt [tinkernet]
if:
contains(steps.changed-files.outputs.all_modified_files, 'tinkernet')
working-directory: ./tinkernet
run: cargo +stable fmt --all -- --check
- name: Cleanup [tinkernet]
if:
contains(steps.changed-files.outputs.all_modified_files, 'tinkernet')
working-directory: ./tinkernet
run: cargo clean
- name: Build [invarch]
if:
contains(steps.changed-files.outputs.all_modified_files, 'invarch')
working-directory: ./invarch
run: cargo build --verbose
- name: Run tests [invarch]
if:
contains(steps.changed-files.outputs.all_modified_files, 'invarch')
working-directory: ./invarch
run: cargo test --verbose
- name: Run clippy [invarch]
if:
contains(steps.changed-files.outputs.all_modified_files, 'invarch')
working-directory: ./invarch
run: cargo clippy -- -D warnings
- name: Run cargofmt [invarch]
if:
contains(steps.changed-files.outputs.all_modified_files, 'invarch')
working-directory: ./invarch
run: cargo +stable fmt --all -- --check
- name: Cleanup [invarch]
if:
contains(steps.changed-files.outputs.all_modified_files, 'invarch')
working-directory: ./invarch
run: cargo clean