1
0
Fork 0
mirror of synced 2024-05-20 04:12:28 +12:00
czkawka/.github/workflows/windows.yml

194 lines
5.8 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:
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
2022-01-06 12:01:06 +13:00
PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu --release
2022-01-06 12:39:25 +13:00
find .
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 }}
2022-01-06 20:54:32 +13:00
path: target/x86_64-pc-windows-gnu/release/czkawka_core.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
2022-01-06 12:01:06 +13:00
PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu
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 }}
2022-01-06 20:54:32 +13:00
path: target/x86_64-pc-windows-gnu/debug/czkawka_core.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
2022-01-06 12:01:06 +13:00
PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu --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 }}
2022-01-06 20:54:32 +13:00
path: target/x86_64-pc-windows-gnu/release/czkawka_core.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
2022-01-06 12:01:06 +13:00
PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=x86_64-pc-windows-gnu
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 }}
2022-01-06 20:54:32 +13:00
path: target/x86_64-pc-windows-gnu/debug/czkawka_core.exe