asset 0.0.1

Ergonomic, automatic, cross crate asset collection and optimization
Documentation
name: windows

on:
  push:
    branches:
      - master
    paths:
      - common/src/**
      - common/examples/**
      - common/Cargo.toml
      - macro/src/**
      - macro/examples/**
      - macro/Cargo.toml
      - examples/**
      - src/**
      - .github/**
      - Cargo.toml

  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]
    branches:
      - master
    paths:
      - common/src/**
      - common/examples/**
      - common/Cargo.toml
      - macro/src/**
      - macro/examples/**
      - macro/Cargo.toml
      - examples/**
      - src/**
      - .github/**
      - Cargo.toml

jobs:
  test:
    if: github.event.pull_request.draft == false
    runs-on: windows-latest
    name: (${{ matrix.target }}, ${{ matrix.cfg_release_channel }})
    env:
      CFG_RELEASE_CHANNEL: ${{ matrix.cfg_release_channel }}
    strategy:
      # https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
      # There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
      # In order to prevent overusing too much of that 60 limit, we throttle the
      # number of rustfmt jobs that will run concurrently.
      # max-parallel:
      # fail-fast: false
      matrix:
        target: [x86_64-pc-windows-gnu, x86_64-pc-windows-msvc]
        cfg_release_channel: [stable]

    steps:
      # The Windows runners have autocrlf enabled by default
      # which causes failures for some of rustfmt's line-ending sensitive tests
      - name: disable git eol translation
        run: git config --global core.autocrlf false

        # Run build
      - name: Install Rustup using win.rustup.rs
        run: |
          # Disable the download progress bar which can cause perf issues
          $ProgressPreference = "SilentlyContinue"
          Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
          .\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none
          del rustup-init.exe
          rustup target add ${{ matrix.target }}
        shell: powershell

      - name: Add mingw64 to path for x86_64-gnu
        run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
        if: matrix.target == 'x86_64-pc-windows-gnu' && matrix.channel == 'nightly'
        shell: bash

      # - name: checkout
      #   uses: actions/checkout@v3
      #   with:
      #     path: C:/collect-assets.git
      #     fetch-depth: 1

      #  we need to use the C drive as the working directory

      - name: Checkout
        run: |
          mkdir C:/collect-assets.git
          git clone https://github.com/dioxuslabs/collect-assets.git C:/collect-assets.git --depth 1

      - name: test
        working-directory: C:/collect-assets.git
        run: |
          rustc -Vv
          cargo -V
          set RUST_BACKTRACE=1
          cargo build --all --tests --examples
          cargo test --all --tests
        shell: cmd