i dont like xwin anymore
This commit is contained in:
78
.github/workflows/build.yml
vendored
78
.github/workflows/build.yml
vendored
@@ -35,74 +35,22 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
host: linux
|
host: linux
|
||||||
|
|
||||||
- name: Download xwin
|
- name: Download llvm-mingw
|
||||||
uses: robinraju/release-downloader@v1.10
|
|
||||||
with:
|
|
||||||
repository: Jake-Shadle/xwin
|
|
||||||
latest: true
|
|
||||||
fileName: 'xwin-*-x86_64-unknown-linux-musl.tar.gz'
|
|
||||||
tarBall: false
|
|
||||||
zipBall: false
|
|
||||||
out-file-path: "epic-xwin"
|
|
||||||
|
|
||||||
- name: Prepare xwin
|
|
||||||
run: |
|
run: |
|
||||||
tar -xzf epic-xwin/xwin-*-x86_64-unknown-linux-musl.tar.gz -C epic-xwin
|
curl -L https://github.com/mstorsjo/llvm-mingw/releases/latest/download/llvm-mingw-linux-x86_64.tar.xz -o llvm-mingw.tar.xz
|
||||||
mv epic-xwin/xwin-*-x86_64-unknown-linux-musl/xwin ./xwin
|
tar -xf llvm-mingw.tar.xz
|
||||||
./xwin --arch x86_64 --sdk-version 10.0.22621 --accept-license list
|
mv llvm-mingw-* llvm-mingw
|
||||||
|
|
||||||
# this caches '.xwin-cache/**/*' but that's actually only gonna
|
|
||||||
# contain the manifest cuz we only ran `xwin list` so far
|
|
||||||
- name: Setup xwin Cache
|
|
||||||
id: xwin-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: .xwin-cache
|
|
||||||
key: xwin-win-v1-${{ hashFiles('.xwin-cache/**/*') }}
|
|
||||||
|
|
||||||
- name: Download Windows headers
|
|
||||||
run: ./xwin --arch x86_64 --sdk-version 10.0.22621 --accept-license splat --include-debug-libs
|
|
||||||
if: steps.xwin-cache.outputs.cache-hit != 'true'
|
|
||||||
|
|
||||||
|
|
||||||
- name: Download clang-msvc-sdk toolchain
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: 'geode-sdk/clang-msvc-sdk'
|
|
||||||
path: toolchain
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Install Clang
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y wget lsb-release software-properties-common gnupg
|
|
||||||
|
|
||||||
wget https://apt.llvm.org/llvm.sh
|
|
||||||
chmod +x llvm.sh
|
|
||||||
sudo ./llvm.sh 21 all
|
|
||||||
|
|
||||||
- name: Add LLVM 21 to path
|
|
||||||
run: echo "/usr/lib/llvm-21/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Verify LLVM
|
|
||||||
run: |
|
|
||||||
which clang-cl
|
|
||||||
which lld-link
|
|
||||||
clang-cl --version
|
|
||||||
lld-link --version
|
|
||||||
|
|
||||||
- name: Create Build Environment
|
|
||||||
# Some projects don't allow in-source building, so create a separate build directory
|
|
||||||
# We'll use this as our working directory for all subsequent commands
|
|
||||||
run: cmake -E make_directory ${{github.workspace}}/build
|
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
working-directory: ${{github.workspace}}/build
|
working-directory: ${{github.workspace}}/build
|
||||||
run: cmake ${{github.workspace}} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN -DCMAKE_CXX_SCAN_FOR_MODULES=OFF -G Ninja
|
run: |
|
||||||
env:
|
cmake -B build \
|
||||||
SPLAT_DIR: ${{ github.workspace }}/.xwin-cache/splat
|
-G Ninja \
|
||||||
TOOLCHAIN: ${{ github.workspace }}/toolchain/clang-cl-msvc.cmake
|
-DCMAKE_SYSTEM_NAME=Windows \
|
||||||
HOST_ARCH: x86_64
|
-DCMAKE_C_COMPILER=$PWD/llvm-mingw/bin/x86_64-w64-mingw32-clang \
|
||||||
|
-DCMAKE_CXX_COMPILER=$PWD/llvm-mingw/bin/x86_64-w64-mingw32-clang++ \
|
||||||
|
-DCMAKE_RC_COMPILER=$PWD/llvm-mingw/bin/x86_64-w64-mingw32-windres \
|
||||||
|
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ${{github.workspace}}/build
|
working-directory: ${{github.workspace}}/build
|
||||||
|
|||||||
Reference in New Issue
Block a user