Skip to content

try to fix the generated project for windows #633

try to fix the generated project for windows

try to fix the generated project for windows #633

Workflow file for this run

name: "CI/CD"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ] # macos tends to break more often.
continue-on-error: false
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Cargo fmt check
run: cargo fmt --all -- --check
# Install dependencies only on Linux
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libudev-dev libpcap-dev
- name: Build vanilla
if: runner.os != 'Windows'
run: |
# For sim even robot/linux specific crate needs to at least compile.
cargo build --workspace --features macro_debug
# For now just test the core on windows.
- name: Build vanilla
if: runner.os == 'Windows'
run: |
cargo build
- name: Build with mocks
if: runner.os != 'Windows'
run: |
cargo build --workspace --features mock
- name: Run tests
if: runner.os != 'Windows'
run: cargo test --workspace
# For now just test the core on windows.
- name: Run tests (windows)
if: runner.os == 'Windows'
run: cargo test
- name: Run clippy
if: runner.os != 'Windows'
run: cargo clippy -- -W warnings
# Integration Test for the 1 liner generation of a project.
- name: Install cargo-generate
if: runner.os != 'Windows'
run: cargo install cargo-generate
- name: Generate new project in temporary directory (Mac+L)
if: runner.os != 'Windows'
run: |
cd templates
cargo generate -p cu_full --name test_project --destination $RUNNER_TEMP --silent
- name: Compile generated project
run: |
if: runner.os == 'Linux'

Check failure on line 78 in .github/workflows/general.yml

View workflow run for this annotation

GitHub Actions / CI/CD

Invalid workflow file

The workflow is not valid. .github/workflows/general.yml (Line: 78, Col: 13): Unexpected symbol: 'cd'. Located at position 22 within expression: runner.os == 'Linux' cd $RUNNER_TEMP/test_project cargo build --release
cd $RUNNER_TEMP/test_project
cargo build --release
- name: Generate new project in temporary directory
if: runner.os == 'Windows'
run: |
cd templates
cargo generate -p cu_full --name test_project --destination %RUNNER_TEMP% --silent
- name: Compile generated project # only on linux as it grabs git master, remove after merge
if: runner.os == 'Windows'
run: |
cd %RUNNER_TEMP%/test_project
cargo build --release