Skip to content

win build print only 3 #65

win build print only 3

win build print only 3 #65

Workflow file for this run

name: Rust
on:
push:
pull_request:
jobs:
build:
strategy:
matrix:
os: [ windows-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: |
ver
echo Current working 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) else (echo JAR file not found)"
shell: cmd
epubcheck-path: "${{ github.workspace }}\epubcheck\epubcheck-5.2.0\epubcheck.jar"
# - 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