1
0
Fork 0
mirror of synced 2024-05-15 09:52:33 +12:00

Test Windows CI (#41)

This commit is contained in:
Rafał Mikrut 2020-10-05 22:07:21 +02:00 committed by GitHub
parent e4af905078
commit 1defc06c75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,8 +33,8 @@ jobs:
target
key: ${{ matrix.os }}-cargo-check-test-${{ matrix.toolchain }}-${{ matrix.type }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install Gtk
run: sudo apt-get update; sudo apt install -y libgtk-3-dev
- 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
if: ${{ runner.os == 'Linux' }}
- name: Build Debug
@ -51,6 +51,39 @@ jobs:
RUSTFLAGS: "-C debuginfo=0 -D warnings"
if: ${{ runner.os == 'Linux' && matrix.type == 'release'}}
- name: Build GUI Windows Cross Compile
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
GTK_LIBRARY="$(pwd)/gtk_library"
GTK_APP="$(pwd)/gtk_app"
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/mingw64.zip
unzip mingw64.zip -d $GTK_LIBRARY
GTK_LIBRARY="$GTK_LIBRARY/mingw64"
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH="$GTK_LIBRARY/lib/pkgconfig" RUSTFLAGS="-L $GTK_LIBRARY/lib" cargo build --target=x86_64-pc-windows-gnu --bin czkawka_gui --release
mkdir $GTK_APP
cp target/x86_64-pc-windows-gnu/release/czkawka_gui.exe $GTK_APP
cp $GTK_LIBRARY/bin/*.dll $GTK_APP
mkdir -p $GTK_APP/share/glib-2.0/schemas
mkdir $GTK_APP/share/icons
cp $GTK_LIBRARY/share/glib-2.0/schemas/* $GTK_APP/share/glib-2.0/schemas
cp -r $GTK_LIBRARY/share/icons/* $GTK_APP/share/icons
mkdir $GTK_APP/lib
cp -r $GTK_LIBRARY/lib/gdk-pixbuf-2.0 $GTK_APP/lib
zip -r gtk_app.zip $GTK_APP
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
if: ${{ runner.os == 'Linux' && matrix.type == 'release'}}
- name: Build CLI Alt Debug
run: cargo build --bin czkawka_cli
env:
@ -107,6 +140,13 @@ jobs:
path: target/release/czkawka_gui
if: ${{ runner.os == 'Linux' && matrix.type == 'release'}}
- name: Store Czkawka Windows GUI CrossComplile
uses: actions/upload-artifact@v2
with:
name: czkawka_gui-Windows-GTK-GUI-${{ matrix.toolchain }}
path: gtk_app.zip
if: ${{ runner.os == 'Linux' && matrix.type == 'release'}}
- name: Store Czkawka GUI Orbtk
uses: actions/upload-artifact@v2
with: