Skip to content

fix: windows test exec #7

fix: windows test exec

fix: windows test exec #7

Workflow file for this run

name: Test
on:
push:
paths:
- '.github/workflows/test.yml'
- 'src/**/*'
- 'Cargo.toml'
pull_request:
paths:
- '.github/workflows/test.yml'
- 'src/**/*'
- 'Cargo.toml'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest, ubuntu-latest, macos-latest]
# Setup
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
./target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
# Build the library
- name: Build
run: cargo build --release
# Build test/test.c
- name: Build test
run: gcc -o test/testlib test/test.c -L target/release -lfile_metadata
# Run test/test.c
- name: Run
if: matrix.platform != 'windows-latest'
run: ./test/testlib
- name: Run
if: matrix.platform == 'windows-latest'
run: test\testlib