Skip to content

try to fix action

try to fix action #31

Workflow file for this run

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
curl -JL -o 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 -oQt6 Qt6.5.0-msvc-shared.7z
tree /f Qt6
exit
- 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: |
$basedir=(pwd).path.replace("\\","/")
choco install ninja
cargo install --path .
mkdir build
cmake -S ./tests -B ./build -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/toolchains/windows.cmake -DCMAKE_PREFIX_PATH="$basedir/Qt6;C:/vcpkg/installed/x64-windows" -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