194 lines
5.8 KiB
YAML
194 lines
5.8 KiB
YAML
name: 🏁 Windows
|
|
on:
|
|
push:
|
|
pull_request:
|
|
schedule:
|
|
- cron: '0 0 * * 2'
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
windows-release-gui:
|
|
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
|
|
|
|
- name: Release normal(gui)
|
|
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
|
|
|
|
|
|
PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu --release
|
|
find .
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
|
|
|
- name: Store Windows GUI CrossComplile
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: czkawka_gui-Windows-release-normal-${{ matrix.toolchain }}
|
|
path: target/x86_64-pc-windows-gnu/release/czkawka_core.exe
|
|
|
|
windows-debug-gui:
|
|
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
|
|
|
|
- name: Release debug(gui)
|
|
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
|
|
|
|
|
|
PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
|
|
|
- name: Store Windows GUI CrossComplile
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: czkawka_gui-Windows-release-normal-${{ matrix.toolchain }}
|
|
path: target/x86_64-pc-windows-gnu/debug/czkawka_core.exe
|
|
|
|
windows-release-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
|
|
|
|
- name: Release normal(gui)
|
|
run: |
|
|
sed -i 's/windows_subsystem = "windows"/windows_subsystem = "console"/' src/main.rs
|
|
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
|
|
|
|
|
|
PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu --release
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
|
|
|
- name: F
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: czkawka_gui-Windows-release-console-${{ matrix.toolchain }}
|
|
path: target/x86_64-pc-windows-gnu/release/czkawka_core.exe
|
|
|
|
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
|
|
|
|
- name: Release debug(gui)
|
|
run: |
|
|
sed -i 's/windows_subsystem = "windows"/windows_subsystem = "console"/' src/main.rs
|
|
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
|
|
|
|
|
|
PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
|
|
|
- name: Store Windows GUI CrossComplile
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: czkawka_gui-Windows-debug-console-${{ matrix.toolchain }}
|
|
path: target/x86_64-pc-windows-gnu/debug/czkawka_core.exe
|