1
0
Fork 0
mirror of synced 2024-06-02 18:44:34 +12:00
czkawka/.github/workflows/windows.yml

332 lines
10 KiB
YAML
Raw Normal View History

2020-10-08 00:17:30 +13:00
name: 🏁 Windows
2021-11-20 21:49:03 +13:00
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 2'
2020-10-08 00:17:30 +13:00
env:
CARGO_TERM_COLOR: always
jobs:
windows-cli:
strategy:
matrix:
toolchain: [ stable ]
type: [ release ]
runs-on: windows-2019
2020-10-08 00:17:30 +13:00
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
2020-10-08 00:17:30 +13:00
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/cache@v2
with:
path: |
target
key: windows-cli-${{github.ref}}-${{github.sha}}
restore-keys: |
windows-cli-${{github.ref}}-${{github.sha}}
- name: Build CLI Debug
run: cargo build --bin czkawka_cli
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
if: ${{ matrix.type == 'debug'}}
- name: Build CLI Release
run: cargo build --release --bin czkawka_cli
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
if: ${{ matrix.type == 'release'}}
- name: Store Windows CLI
uses: actions/upload-artifact@v2
with:
name: czkawka_cli-${{ runner.os }}-${{ matrix.toolchain }}
path: target/release/czkawka_cli.exe
if: ${{ matrix.type == 'release' }}
2021-11-28 08:57:10 +13:00
# Duplicate finder checks included and excluded directories
# Others are just check delete files number
# Windows build have some elements changed like powershell before wget and unzip, python instead python3, rm -r instead rm -r and one (at the top) additional test which check size of characyers
- name: test
run: |
powershell wget https://github.com/qarmin/czkawka/releases/download/1.1.0/TestSuite.zip -O TestSuite.zip
powershell unzip TestSuite.zip -d TestSuite
python misc/check_results.py TestSuite 15 8
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" "$(pwd)\testsuite" -e "$(pwd)/TestSuite/subFolder" -D aeo -m 1024
python misc/check_results.py TestSuite 13 8
rm -r TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" "$(pwd)/teStSuite" -D aen -m 1024
python misc/check_results.py TestSuite 7 8
rm -r TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli dup -d "$(pwd)\TestSuite" "$(pwd)/TESTSUITE" -D aen -m 1024
python misc/check_results.py TestSuite 7 8
rm -r TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -D aen -m 1024
python misc/check_results.py TestSuite 7 8
rm -r TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -D aen -m 1024
python misc/check_results.py TestSuite 7 8
rm -r TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -x TEXT -D aeo -m 1024
python misc/check_results.py TestSuite 14 8
rm -r TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -e "$(pwd)/TestSuite/SubFolder" -D aeo -m 1024
python misc/check_results.py TestSuite 13 8
rm -r TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -m 1500 -D aeo
python misc/check_results.py TestSuite 8 8
rm -r TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -R -m 1024
python misc/check_results.py TestSuite 15 8
target/release/czkawka_cli dup -d "$(pwd)/TestSuite" -R -D aeo -m 1024
python misc/check_results.py TestSuite 13 8
target/release/czkawka_cli big -d "$(pwd)/TestSuite"
rm -r TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli empty-files -d "$(pwd)/TestSuite"
python misc/check_results.py TestSuite 15 8
target/release/czkawka_cli empty-files -d "$(pwd)/TestSuite" -D
python misc/check_results.py TestSuite 13 8
rm -r TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli empty-folders -d "$(pwd)/TestSuite"
python misc/check_results.py TestSuite 15 8
target/release/czkawka_cli empty-folders -d "$(pwd)/TestSuite" -D
python misc/check_results.py TestSuite 15 2
rm -r TestSuite
unzip TestSuite.zip -d TestSuite
target/release/czkawka_cli temp -d "$(pwd)/TestSuite"
python misc/check_results.py TestSuite 15 8
target/release/czkawka_cli temp -d "$(pwd)/TestSuite" -D
python misc/check_results.py TestSuite 14 8
if: ${{ matrix.type == 'release' }}
2022-01-06 11:46:20 +13:00
windows-release-gui:
2020-10-08 00:17:30 +13:00
strategy:
matrix:
toolchain: [ stable ]
type: [ release ]
runs-on: ubuntu-20.04
2020-10-08 00:17:30 +13:00
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/cache@v2
with:
path: |
target
key: windows-gui-${{github.ref}}-${{github.sha}}
restore-keys: |
windows-gui-${{github.ref}}-${{github.sha}}
- name: Install Gtk, Mingw, unzip, zip and wget
run: sudo apt-get update; sudo apt install mingw-w64 libgtk-3-dev unzip wget zip -y
2022-01-06 11:46:20 +13:00
- name: Release normal(gui)
2020-10-08 00:17:30 +13:00
run: |
rustup target add x86_64-pc-windows-gnu
echo "[target.x86_64-pc-windows-gnu]" > ~/.cargo/config
echo "linker = \"x86_64-w64-mingw32-gcc\"" >> ~/.cargo/config
echo "ar = \"x86_64-w64-mingw32-gcc-ar\"" >> ~/.cargo/config
2022-01-06 11:46:20 +13:00
PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu --bin czkawka_gui --release
2020-10-08 00:17:30 +13:00
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
- name: Store Windows GUI CrossComplile
uses: actions/upload-artifact@v2
with:
2022-01-06 11:46:20 +13:00
name: czkawka_gui-Windows-release-normal-${{ matrix.toolchain }}
path: target/release/czkawka_gui.exe
2022-01-06 11:46:20 +13:00
windows-debug-gui:
2022-01-04 09:09:30 +13:00
strategy:
matrix:
toolchain: [ stable ]
type: [ release ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/cache@v2
with:
path: |
target
key: windows-gui-${{github.ref}}-${{github.sha}}
restore-keys: |
windows-gui-${{github.ref}}-${{github.sha}}
- name: Install Gtk, Mingw, unzip, zip and wget
run: sudo apt-get update; sudo apt install mingw-w64 libgtk-3-dev unzip wget zip -y
2022-01-06 11:46:20 +13:00
- name: Release debug(gui)
2022-01-04 09:09:30 +13:00
run: |
rustup target add x86_64-pc-windows-gnu
echo "[target.x86_64-pc-windows-gnu]" > ~/.cargo/config
echo "linker = \"x86_64-w64-mingw32-gcc\"" >> ~/.cargo/config
echo "ar = \"x86_64-w64-mingw32-gcc-ar\"" >> ~/.cargo/config
2022-01-06 11:46:20 +13:00
PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu --bin czkawka_gui
2022-01-04 09:09:30 +13:00
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
- name: Store Windows GUI CrossComplile
uses: actions/upload-artifact@v2
with:
2022-01-06 11:46:20 +13:00
name: czkawka_gui-Windows-release-normal-${{ matrix.toolchain }}
path: target/debug/czkawka_gui.exe
2022-01-04 09:09:30 +13:00
2022-01-06 11:46:20 +13:00
windows-release-console:
2022-01-04 08:51:45 +13:00
strategy:
matrix:
toolchain: [ stable ]
type: [ release ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/cache@v2
with:
path: |
target
key: windows-gui-${{github.ref}}-${{github.sha}}
restore-keys: |
windows-gui-${{github.ref}}-${{github.sha}}
- name: Install Gtk, Mingw, unzip, zip and wget
run: sudo apt-get update; sudo apt install mingw-w64 libgtk-3-dev unzip wget zip -y
2022-01-06 11:46:20 +13:00
- name: Release normal(gui)
2022-01-04 08:51:45 +13:00
run: |
2022-01-06 11:46:20 +13:00
sed -i 's/windows_subsystem = "windows"/windows_subsystem = "console"/' src/main.rs
2022-01-04 08:51:45 +13:00
rustup target add x86_64-pc-windows-gnu
echo "[target.x86_64-pc-windows-gnu]" > ~/.cargo/config
echo "linker = \"x86_64-w64-mingw32-gcc\"" >> ~/.cargo/config
echo "ar = \"x86_64-w64-mingw32-gcc-ar\"" >> ~/.cargo/config
2022-01-06 11:46:20 +13:00
PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu --bin czkawka_gui --release
2022-01-04 08:51:45 +13:00
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
2022-01-06 11:46:20 +13:00
- name: F
2022-01-04 08:51:45 +13:00
uses: actions/upload-artifact@v2
with:
2022-01-06 11:46:20 +13:00
name: czkawka_gui-Windows-release-console-${{ matrix.toolchain }}
path: target/release/czkawka_gui.exe
2022-01-04 08:51:45 +13:00
2022-01-06 11:46:20 +13:00
windows-debug-console:
strategy:
matrix:
toolchain: [ stable ]
type: [ release ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/cache@v2
with:
path: |
target
key: windows-gui-${{github.ref}}-${{github.sha}}
restore-keys: |
windows-gui-${{github.ref}}-${{github.sha}}
- name: Install Gtk, Mingw, unzip, zip and wget
run: sudo apt-get update; sudo apt install mingw-w64 libgtk-3-dev unzip wget zip -y
2022-01-06 11:46:20 +13:00
- name: Release debug(gui)
2020-10-08 00:17:30 +13:00
run: |
2022-01-06 11:46:20 +13:00
sed -i 's/windows_subsystem = "windows"/windows_subsystem = "console"/' src/main.rs
2020-10-08 00:17:30 +13:00
rustup target add x86_64-pc-windows-gnu
echo "[target.x86_64-pc-windows-gnu]" > ~/.cargo/config
echo "linker = \"x86_64-w64-mingw32-gcc\"" >> ~/.cargo/config
echo "ar = \"x86_64-w64-mingw32-gcc-ar\"" >> ~/.cargo/config
2022-01-06 11:46:20 +13:00
PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu --bin czkawka_gui
2020-10-08 00:17:30 +13:00
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
- name: Store Windows GUI CrossComplile
uses: actions/upload-artifact@v2
with:
2022-01-06 11:46:20 +13:00
name: czkawka_gui-Windows-debug-console-${{ matrix.toolchain }}
path: target/debug/czkawka_gui.exe