Skip to content

Commit

Permalink
feat: install additional dependencies for windows support
Browse files Browse the repository at this point in the history
- 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`
  • Loading branch information
falcucci committed Sep 19, 2024
1 parent 7dfec7d commit 11a2d65
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 44 deletions.
88 changes: 44 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ fn font_styles() {
attributes: Attributes,
synthesis: Synthesis,
}

let lines = vec![
(
"FiraCode Normal",
Expand Down

0 comments on commit 11a2d65

Please sign in to comment.