Skip to content

win build again step 9 #74

win build again step 9

win build again step 9 #74

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: |
# Print system info
echo "Current workspace is: $GITHUB_WORKSPACE"
echo "Current directory is: $PWD"
pwd
# Create directory for epubcheck
mkdir -p "$GITHUB_WORKSPACE/epubcheck"
echo "Created directory at: $GITHUB_WORKSPACE/epubcheck"
# Download epubcheck
curl -L -o "$GITHUB_WORKSPACE/epubcheck/epubcheck.zip" https://github.com/w3c/epubcheck/releases/download/v5.2.0/epubcheck-5.2.0.zip
echo "Downloaded epubcheck to: $GITHUB_WORKSPACE/epubcheck/epubcheck.zip"
# Extract archive and check contents
cd "$GITHUB_WORKSPACE/epubcheck"
7z x epubcheck.zip
echo "Archive extracted to: $PWD"
ls -la
# Check epubcheck-5.2.0 directory contents
echo "Checking epubcheck-5.2.0 contents:"
ls -la epubcheck-5.2.0/
# Set and verify epubcheck path
EPUBCHECK_JAR="$GITHUB_WORKSPACE/epubcheck/epubcheck-5.2.0/epubcheck.jar"
echo "Value to be set: $EPUBCHECK_JAR"
# Verify file exists
if [ -f "$EPUBCHECK_JAR" ]; then
echo "JAR file exists at: $EPUBCHECK_JAR"
else
echo "JAR file not found at: $EPUBCHECK_JAR"
exit 1
fi
# Set epubcheck path using working approach
EPUBCHECK_JAR="$GITHUB_WORKSPACE/epubcheck/epubcheck-5.2.0/epubcheck.jar"
echo "EPUBCHECK_PATH=$EPUBCHECK_JAR" >> "$GITHUB_ENV"
# Debug output
echo "Debug: Setting EPUBCHECK_PATH to: $EPUBCHECK_JAR"
# Verify the value
echo "Debug: Current GITHUB_ENV contents:"
cat "$GITHUB_ENV"
# Show current value
echo "Current environment variables:"
env | grep EPUBCHECK
# 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)"
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