ext4-fs 0.1.1

A very basic library to read the ext4 filesystem
Documentation
name: ext4 PR Actions

on:
  pull_request:
    branches:
      - "main"

env:
  CARGO_TERM_COLOR: always

permissions: {}

jobs:
  build-pr:
    name: Build and Test
    strategy:
      fail-fast: false
      matrix:
        info:
          - { os: "macos-latest", target: "aarch64-apple-darwin", cross: false }
          - {
              os: "ubuntu-latest",
              target: "x86_64-unknown-linux-gnu",
              cross: false,
            }
          - {
              os: "windows-latest",
              target: "x86_64-pc-windows-msvc",
              cross: false,
            }
          - os: "windows-11-arm"
            target: "aarch64-pc-windows-msvc"
    runs-on: ${{ matrix.info.os }}
    permissions: 
      contents: read
    steps:
      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5
        with:
          persist-credentials: false
      - name: Set up Rust toolchain
        uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921 #v2025.09.23
        with:
          toolchain: stable
          components: rustfmt, clippy
          targets: ${{ matrix.info.target }}
      - name: Enable Rust cache
        uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 #v2.8.1
        with:
          save-if: false
      - name: Fmt Check
        run: cargo fmt -- --check

      - name: Build tests
        run: cargo test --no-run --release

      - name: Run tests macos
        if: matrix.info.os == 'macOS-latest'
        run: cd tests/images && wget -O test.img https://github.com/puffyCid/ext4-fs/releases/download/v0.0.0/test.img && cargo test --release

      - name: Run tests Linux
        if: matrix.info.os == 'ubuntu-latest'
        run: cd tests/images && wget -O test.img https://github.com/puffyCid/ext4-fs/releases/download/v0.0.0/test.img && cargo test --release

      - name: Run tests Windows
        if: matrix.info.os == 'windows-latest'
        run: cd tests/images && Invoke-WebRequest -Uri "https://github.com/puffyCid/ext4-fs/releases/download/v0.0.0/test.img" -OutFile test.img && cargo test --release
        
      - name: Run tests Windows ARM
        if: matrix.info.os == 'windows-11-arm'
        run: cd tests/images && Invoke-WebRequest -Uri "https://github.com/puffyCid/ext4-fs/releases/download/v0.0.0/test.img" -OutFile test.img && cargo test --release