Skip to content

win build change 3

win build change 3 #60

Workflow file for this run

name: Rust
on:
push:
pull_request:
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
include:
- os: ubuntu-latest
install-epubcheck: sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install -y epubcheck
epubcheck-path: epubcheck
- os: windows-latest
install-epubcheck: |
# Print Windows version and env
cmd.exe /c "ver"
cmd.exe /c "echo Current workspace: %GITHUB_WORKSPACE%"
cmd.exe /c "echo Current directory: %CD%"
cmd.exe /c "mkdir %GITHUB_WORKSPACE%\epubcheck"
cmd.exe /c "echo Created directory at: %GITHUB_WORKSPACE%\epubcheck"
# Donwloading and unpack
curl -L -o %GITHUB_WORKSPACE%\epubcheck\epubcheck.zip https://github.com/w3c/epubcheck/releases/download/v5.2.0/epubcheck-5.2.0.zip
cd %GITHUB_WORKSPACE%\epubcheck
cmd.exe /c "echo Changed to directory: %CD%"
7z x epubcheck.zip
# Current dir content
cmd.exe /c "echo Contents of epubcheck directory:"
cmd.exe /c "dir /s"
echo "EPUBCHECK_PATH=%GITHUB_WORKSPACE%\epubcheck\epubcheck-5.2.0\epubcheck.jar" >> $GITHUB_ENV
cmd.exe /c "echo Set EPUBCHECK_PATH to: %GITHUB_WORKSPACE%\epubcheck\epubcheck-5.2.0\epubcheck.jar"
# Setup full path to jar file
echo "EPUBCHECK_PATH=%GITHUB_WORKSPACE%\epubcheck\epubcheck-5.2.0\epubcheck.jar" >> $GITHUB_ENV
cmd.exe /c "echo Set EPUBCHECK_PATH to: %GITHUB_WORKSPACE%\epubcheck\epubcheck-5.2.0\epubcheck.jar"
# Check if file exists
cmd.exe /c "if exist %GITHUB_WORKSPACE%\epubcheck\epubcheck-5.2.0\epubcheck.jar (echo JAR file found at: %GITHUB_WORKSPACE%\epubcheck\epubcheck-5.2.0\epubcheck.jar)"
epubcheck-path: "${{ env.EPUBCHECK_PATH }}"

Check failure on line 47 in .github/workflows/rust.yml

View workflow run for this annotation

GitHub Actions / Rust

Invalid workflow file

The workflow is not valid. .github/workflows/rust.yml (Line: 47, Col: 29): Unrecognized named-value: 'env'. Located at position 1 within expression: env.EPUBCHECK_PATH
- os: macos-latest
install-epubcheck: brew install epubcheck
epubcheck-path: epubcheck
runs-on: ${{ matrix.os }}
env:
EPUBCHECK_PATH: ${{ matrix.epubcheck-path }}
steps:
- name: Set up Rust
uses: actions/checkout@v4
- name: Install cargo version
uses: dtolnay/rust-toolchain@stable
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install epubcheck
run: ${{ matrix.install-epubcheck }}
shell: bash
- name: Install cargo audit
run: cargo install cargo-audit
- name: Show rust version
run: cargo --version
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run Clippy
run: cargo clippy -- --no-deps -Dwarnings
- name: Audit
run: cargo audit