From 11a2d6517fd14cf59ae73c64da068b84fd7e1e5d Mon Sep 17 00:00:00 2001 From: Alexsander Falcucci Date: Fri, 20 Sep 2024 00:43:33 +0200 Subject: [PATCH] feat: install additional dependencies for windows support - add a step to install `dxc` on windows - add a step to install `warp` on windows - add a step to install `mesa` on windows - update the file `test.rs` by adding a new line in the function `font_styles` --- .github/workflows/ci.yml | 88 ++++++++++++++++++++-------------------- src/test.rs | 1 + 2 files changed, 45 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe00160..d1da63a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,50 +140,50 @@ jobs: echo "LD_LIBRARY_PATH=$PWD/mesa/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH" >> "$GITHUB_ENV" echo "LIBGL_DRIVERS_PATH=$PWD/mesa/lib/x86_64-linux-gnu/dri" >> "$GITHUB_ENV" - # - name: (windows) install dxc - # if: matrix.os == 'windows-2022' - # shell: bash - # run: | - # set -e - # - # curl.exe -L --retry 5 https://github.com/microsoft/DirectXShaderCompiler/releases/download/$DXC_RELEASE/$DXC_FILENAME -o dxc.zip - # 7z.exe e dxc.zip -odxc bin/x64/{dxc.exe,dxcompiler.dll,dxil.dll} - # - # # We need to use cygpath to convert PWD to a windows path as we're using bash. - # cygpath --windows "$PWD/dxc" >> "$GITHUB_PATH" - # - # - name: (windows) install warp - # if: matrix.os == 'windows-2022' - # shell: bash - # run: | - # set -e - # - # # Make sure dxc is in path. - # dxc --version - # - # curl.exe -L --retry 5 https://www.nuget.org/api/v2/package/Microsoft.Direct3D.WARP/$WARP_VERSION -o warp.zip - # 7z.exe e warp.zip -owarp build/native/amd64/d3d10warp.dll - # - # mkdir -p target/llvm-cov-target/debug/deps - # - # cp -v warp/d3d10warp.dll target/llvm-cov-target/debug/ - # cp -v warp/d3d10warp.dll target/llvm-cov-target/debug/deps - # - # - name: (windows) install mesa - # if: matrix.os == 'windows-2022' - # shell: bash - # run: | - # set -e - # - # curl.exe -L --retry 5 https://github.com/pal1000/mesa-dist-win/releases/download/$MESA_VERSION/mesa3d-$MESA_VERSION-release-msvc.7z -o mesa.7z - # 7z.exe e mesa.7z -omesa x64/{opengl32.dll,libgallium_wgl.dll,libglapi.dll,vulkan_lvp.dll,lvp_icd.x86_64.json} - # - # cp -v mesa/* target/llvm-cov-target/debug/ - # cp -v mesa/* target/llvm-cov-target/debug/deps - # - # # We need to use cygpath to convert PWD to a windows path as we're using bash. - # echo "VK_DRIVER_FILES=`cygpath --windows $PWD/mesa/lvp_icd.x86_64.json`" >> "$GITHUB_ENV" - # echo "GALLIUM_DRIVER=llvmpipe" >> "$GITHUB_ENV" + - name: (windows) install dxc + if: matrix.os == 'windows-2022' + shell: bash + run: | + set -e + + curl.exe -L --retry 5 https://github.com/microsoft/DirectXShaderCompiler/releases/download/$DXC_RELEASE/$DXC_FILENAME -o dxc.zip + 7z.exe e dxc.zip -odxc bin/x64/{dxc.exe,dxcompiler.dll,dxil.dll} + + # We need to use cygpath to convert PWD to a windows path as we're using bash. + cygpath --windows "$PWD/dxc" >> "$GITHUB_PATH" + + - name: (windows) install warp + if: matrix.os == 'windows-2022' + shell: bash + run: | + set -e + + # Make sure dxc is in path. + dxc --version + + curl.exe -L --retry 5 https://www.nuget.org/api/v2/package/Microsoft.Direct3D.WARP/$WARP_VERSION -o warp.zip + 7z.exe e warp.zip -owarp build/native/amd64/d3d10warp.dll + + mkdir -p target/llvm-cov-target/debug/deps + + cp -v warp/d3d10warp.dll target/llvm-cov-target/debug/ + cp -v warp/d3d10warp.dll target/llvm-cov-target/debug/deps + + - name: (windows) install mesa + if: matrix.os == 'windows-2022' + shell: bash + run: | + set -e + + curl.exe -L --retry 5 https://github.com/pal1000/mesa-dist-win/releases/download/$MESA_VERSION/mesa3d-$MESA_VERSION-release-msvc.7z -o mesa.7z + 7z.exe e mesa.7z -omesa x64/{opengl32.dll,libgallium_wgl.dll,libglapi.dll,vulkan_lvp.dll,lvp_icd.x86_64.json} + + cp -v mesa/* target/llvm-cov-target/debug/ + cp -v mesa/* target/llvm-cov-target/debug/deps + + # We need to use cygpath to convert PWD to a windows path as we're using bash. + echo "VK_DRIVER_FILES=`cygpath --windows $PWD/mesa/lvp_icd.x86_64.json`" >> "$GITHUB_ENV" + echo "GALLIUM_DRIVER=llvmpipe" >> "$GITHUB_ENV" - name: Set up Scoop if: matrix.os == 'windows-2022' diff --git a/src/test.rs b/src/test.rs index 577c238..ac30358 100644 --- a/src/test.rs +++ b/src/test.rs @@ -310,6 +310,7 @@ fn font_styles() { attributes: Attributes, synthesis: Synthesis, } + let lines = vec![ ( "FiraCode Normal",