try to fix action #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: windows | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: windows-latest | |
# strategy: | |
# matrix: | |
# compiler: [msvc, gcc] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
- name: install deploy-dll | |
run: cargo install --path . | |
- name: Install Qt | |
run: | | |
cmd | |
cd D:\a | |
curl -JL -o D:\a\Qt6.5.0-msvc-shared.7z "https://github.com/SlopeCraft/QtBinaries/releases/download/qt6.5.0-x86_64-msvc-windows/Qt6.5.0-msvc-shared.7z" | |
7z x -oD:\a\Qt6 D:\a\Qt6.5.0-msvc-shared.7z | |
exit | |
tree /f D:\a\Qt6 | |
- name: Install libzip | |
run: vcpkg install libzip --triplet=x64-windows | |
- name: Test with command line | |
run: | | |
mkdir test | |
cp C:/vcpkg/installed/x64-windows/bin/zip.dll ./test | |
ls -l ./test | |
deploy-dll ./test/zip.dll --cmake-prefix-path=C:/vcpkg/installed/x64-windows --verbose | |
- name: Test with cmake | |
run: | | |
choco install ninja | |
cargo install --path . | |
mkdir build | |
cmake -S ./tests -B ./build -DCMAKE_PREFIX_PATH=C:/vcpkg/installed/x64-windows;D:\a\Qt6 -DCMAKE_INSTALL_PREFIX=install | |
cmake --build ./build | |
cd ./build | |
cpack -G 7Z | |
cmake --install . | |
- name: Make package | |
run: | | |
cargo build --release | |
mkdir target/make-package | |
cargo install --path . --root target/make-package | |
cp C:/mingw64/bin/objdump.exe ./target/make-package/bin | |
deploy-dll ./target/make-package/bin/deploy-dll.exe --shallow-search-dir=C:/mingw64/bin | |
deploy-dll ./target/make-package/bin/objdump.exe --shallow-search-dir=C:/mingw64/bin | |
- name: Upload package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: SharedLibDeployer-1.0.0-win64 | |
path: target/make-package | |
if-no-files-found: error | |
- name: Make package(best compat) | |
run: | | |
deploy-dll ./target/make-package/bin/deploy-dll.exe --shallow-search-dir=C:/mingw64/bin --copy-vc-redist | |
deploy-dll ./target/make-package/bin/objdump.exe --shallow-search-dir=C:/mingw64/bin --copy-vc-redist | |
- name: Upload package(best compat) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: SharedLibDeployer-compat-1.0.0-win64 | |
path: target/make-package | |
if-no-files-found: error | |