-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f5f3ed
commit 0813890
Showing
1 changed file
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
name: Build & Run | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Linux: | ||
runs-on: ubuntu-latest | ||
container: opensuse/tumbleweed | ||
|
||
strategy: | ||
fail-fast: true | ||
|
||
steps: | ||
- name: Install prerequisites | ||
run: | | ||
zypper -n in wine msitools awk cmake ninja make gcc14-c++ clang lld libc++-devel | ||
ln -s /usr/bin/gcc-14 /usr/local/bin/gcc | ||
ln -s /usr/bin/g++-14 /usr/local/bin/g++ | ||
mkdir $HOME/.wine # wine: '/github/home' is not owned by you, refusing to create a configuration directory there | ||
- name: Checkout msvc-wine | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: mstorsjo/msvc-wine | ||
path: msvc-wine | ||
|
||
- name: Install msvc-wine | ||
run: | | ||
mkdir /opt/msvc | ||
cd msvc-wine | ||
./vsdownload.py --accept-license --preview --dest /opt/msvc | ||
./install.sh /opt/msvc | ||
- uses: actions/checkout@v4 | ||
|
||
- name: gcc | ||
run: make gcc LAUNCHER=./ | ||
|
||
- name: cmake gcc | ||
run: cmake -P workflow.cmake -- gcc | ||
|
||
- name: clang | ||
run: make clang LAUNCHER=./ | ||
|
||
- name: cmake clang | ||
run: cmake -P workflow.cmake -- clang | ||
|
||
- name: clang-cl | ||
run: make clang-cl CXXFLAGS="-winsysroot /opt/msvc -fuse-ld=lld" LAUNCHER="WINEDEBUG=-all wine64 " | ||
|
||
- name: msvc-wine | ||
run: PATH=/opt/msvc/bin/x64:$PATH make msvc LAUNCHER="WINEDEBUG=-all wine64 " VCTOOLSINSTALLDIR=/opt/msvc | ||
|
||
- name: cmake msvc-wine | ||
run: cmake -P workflow.cmake -- msvc-wine | ||
|
||
|
||
Windows: | ||
runs-on: windows-latest | ||
|
||
strategy: | ||
fail-fast: true | ||
|
||
steps: | ||
- name: Install prerequisites | ||
run: | | ||
choco upgrade --no-progress llvm | ||
choco install --no-progress ninja | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: MSYS | ||
release: false | ||
update: true | ||
install: >- | ||
make | ||
ucrt64/mingw-w64-ucrt-x86_64-gcc | ||
clang64/mingw-w64-clang-x86_64-clang | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Create Visual Studio Developer Shell | ||
run: | | ||
Set-Content vsdevcmd.cmd @" | ||
@echo off | ||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | ||
rename %1 %~nx1.bat | ||
%1.bat | ||
"@ | ||
- name: msvc | ||
shell: vsdevcmd {0} | ||
run: nmake -nologo msvc | ||
|
||
- name: cmake msvc | ||
shell: vsdevcmd {0} | ||
run: cmake -P workflow.cmake -- default | ||
|
||
- name: msbuild | ||
run: cmake -P workflow.cmake -- msbuild | ||
|
||
- name: clang | ||
shell: vsdevcmd {0} | ||
run: nmake -nologo clang-win32 | ||
|
||
- name: cmake clang | ||
run: cmake -P workflow.cmake -- clang | ||
|
||
- name: clang-cl | ||
shell: vsdevcmd {0} | ||
run: nmake -nologo clang-cl | ||
|
||
- name: mingw-ucrt64 | ||
shell: msys2 {0} | ||
env: | ||
MSYSTEM: UCRT64 | ||
run: make gcc LAUNCHER=./ | ||
|
||
- name: cmake mingw-ucrt64 | ||
if: false | ||
run: cmake -P workflow.cmake -- mingw-ucrt64 | ||
|
||
- name: mingw-clang64 | ||
shell: msys2 {0} | ||
env: | ||
MSYSTEM: CLANG64 | ||
run: make clang-mingw LAUNCHER=./ | ||
|
||
- name: cmake mingw-clang64 | ||
run: cmake -P workflow.cmake -- mingw-clang64 |