Skip to content

Commit

Permalink
chore: add support for windows-2022 and improve installation instruct…
Browse files Browse the repository at this point in the history
…ions

- update the matrix to include windows-2022 for the os
- comment out the installation of mesa and instead add instructions for installing dxc and warp for windows-2022
- add steps to set up scoop and install various fonts
- modify the matrix to include windows-2022 in another section of the file
  • Loading branch information
falcucci committed Sep 19, 2024
1 parent 74e83ca commit f7a819d
Showing 1 changed file with 55 additions and 13 deletions.
68 changes: 55 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-22.04]
os: [windows-2022, macos-latest, ubuntu-22.04]
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@v4
Expand All @@ -49,7 +49,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-22.04]
os: [windows-2022, macos-latest, ubuntu-22.04]
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-22.04]
os: [windows-2022, macos-latest, ubuntu-22.04]
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -140,17 +140,59 @@ 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: install Mesa
# - name: (windows) install dxc
# if: matrix.os == 'windows-2022'
# shell: bash
# run: |
# if [[ $RUNNER_OS == "Linux" ]]; then
# sudo add-apt-repository ppa:kisak/kisak-mesa
# sudo apt update
# sudo apt upgrade
# set -e
#
# sudo add-apt-repository ppa:oibaf/graphics-drivers
# sudo apt update
# sudo apt upgrade
# fi
# 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'
run: |
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
scoop install git
scoop bucket add extras
scoop bucket add nerd-fonts
scoop install Monaspace-NF FiraCode-NF ProFont-NF CascadiaCode-NF Noto-NF
- name: Install Fonts
run: |
Expand Down Expand Up @@ -194,7 +236,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-22.04]
os: [windows-2022, macos-latest, ubuntu-22.04]
toolchain: [stable, nightly]
runs-on: ${{ matrix.os }}

Expand Down

0 comments on commit f7a819d

Please sign in to comment.