Skip to content
Draft

Meson #498

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 45 additions & 60 deletions .github/workflows/avara-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,75 +11,60 @@ jobs:
name: Ubuntu Latest
runs-on: ubuntu-latest
steps:
- name: install dependencies
run: |
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
sudo apt-get update -y -qq
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libegl1-mesa-dev libgles2-mesa-dev libdirectfb-dev libgtest-dev libsqlite3-dev
- uses: actions/checkout@v4
- name: make
run: make -j2
- name: Run headless test
uses: GabrielBB/xvfb-action@v1.7
with:
run: make tests
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
sudo apt-get update -y -qq
sudo apt-get install libegl1-mesa-dev libgles2-mesa-dev
python -m pip install meson ninja
- name: Configure Project
run: meson setup build
env:
CC: clang
CXX: clang++
- name: Build
run: meson compile -C build
- name: Run headless test
uses: GabrielBB/xvfb-action@v1.7
with:
run: meson test -v -C build
Windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
- name: Build
run: |
vcpkg integrate install
.\bin\git_version.ps1
msbuild /m /p:Platform=x64 /p:Configuration=Release .\Avara.msvc\Avara.sln
shell: pwsh
- name: Run headless test
run: .\Avara.msvc\x64\Release\Tests.exe
shell: pwsh
- name: WinAvara archive
run: .\bin\winavarazip.ps1
shell: pwsh
- name: deploy main nightly
if: startsWith(github.repository_owner, 'avaraline') && endsWith(github.ref, 'main')
uses: WebFreak001/deploy-nightly@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: python -m pip install meson ninja
- name: Prepare MSVC
uses: bus1/cabuild/action/msdevshell@v1
with:
upload_url: https://uploads.github.com/repos/avaraline/Avara/releases/28954246/assets{?name,label}
release_id: 28954246
asset_path: ./WinAvara.zip
asset_name: Avara-Windows-Nightly-$$.zip
asset_content_type: application/zip
max_releases: 1
architecture: x64
- name: Prepare build
run: meson setup build
- name: Build
run: meson compile -C build
- name: Test
run: meson test -v -C build
macOS:
name: macOS
runs-on: macos-13
steps:
- name: install dependencies
run: |
wget -q "https://github.com/libsdl-org/SDL/releases/download/release-2.26.2/SDL2-2.26.2.dmg"
hdiutil attach SDL2-2.26.2.dmg
sudo cp -R /Volumes/SDL2/SDL2.framework /Library/Frameworks/
brew install googletest
- uses: actions/checkout@v4
- name: Run headless tests
run: make -j4 tests
- name: make macdist
run: make -j4 clean macdist
- name: deploy main nightly
if: startsWith(github.repository_owner, 'avaraline') && endsWith(github.ref, 'main')
uses: WebFreak001/deploy-nightly@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
upload_url: https://uploads.github.com/repos/avaraline/Avara/releases/28954246/assets{?name,label}
release_id: 28954246
asset_path: ./build/MacAvara.zip
asset_name: Avara-macOS-Nightly-$$.zip
asset_content_type: application/zip
max_releases: 1
python-version: '3.x'
- name: Install dependencies
run: python -m pip install meson ninja
- name: Prepare build
run: meson setup build
- name: Build
run: meson compile -C build
- name: Test
run: meson test -v -C build
2 changes: 2 additions & 0 deletions Avara.msvc/AvaraCore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
<ClInclude Include="..\src\assets\AssetRepository.h" />
<ClInclude Include="..\src\assets\AssetStorage.h" />
<ClInclude Include="..\src\assets\BaseAssetStorage.h" />
<ClInclude Include="..\src\assets\BasePath.h" />
<ClInclude Include="..\src\assets\LocalAssetRepository.h" />
<ClInclude Include="..\src\assets\PackageManifest.h" />
<ClInclude Include="..\src\audio\CBasicSound.h" />
Expand Down Expand Up @@ -369,6 +370,7 @@
<ItemGroup>
<ClCompile Include="..\src\assets\AssetManager.cpp" />
<ClCompile Include="..\src\assets\BaseAssetStorage.cpp" />
<ClCompile Include="..\src\assets\BasePath.cpp" />
<ClCompile Include="..\src\assets\LocalAssetRepository.cpp" />
<ClCompile Include="..\src\assets\PackageManifest.cpp" />
<ClCompile Include="..\src\audio\CBasicSound.cpp" />
Expand Down
6 changes: 6 additions & 0 deletions Avara.msvc/AvaraCore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
<ClInclude Include="..\src\assets\BaseAssetStorage.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\assets\BasePath.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\assets\LocalAssetRepository.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -995,6 +998,9 @@
<ClCompile Include="..\src\assets\BaseAssetStorage.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\assets\BasePath.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\vendor\csscolorparser.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down
10 changes: 10 additions & 0 deletions Avara.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

/* Begin PBXBuildFile section */
6025AE4E2C255E6A00A57EFB /* LegacyOpenGLRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 60C274E22C23EBE9005B67A9 /* LegacyOpenGLRenderer.cpp */; };
6055BF212DEA8A79005E3CFB /* BasePath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6055BF202DEA8A79005E3CFB /* BasePath.cpp */; };
6055BF222DEA8A79005E3CFB /* BasePath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6055BF202DEA8A79005E3CFB /* BasePath.cpp */; };
6055BF232DEA8A79005E3CFB /* BasePath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6055BF202DEA8A79005E3CFB /* BasePath.cpp */; };
940541ED2B5875B200E32241 /* OpenGLShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940541EC2B5875B200E32241 /* OpenGLShader.cpp */; };
940541EE2B5875B200E32241 /* OpenGLShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940541EC2B5875B200E32241 /* OpenGLShader.cpp */; };
9419E8472B49ECB1007C50D0 /* CTeamColorAdjuster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9419E8462B49ECB1007C50D0 /* CTeamColorAdjuster.cpp */; };
Expand Down Expand Up @@ -577,6 +580,8 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
6055BF1F2DEA8A79005E3CFB /* BasePath.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BasePath.h; sourceTree = "<group>"; };
6055BF202DEA8A79005E3CFB /* BasePath.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = BasePath.cpp; sourceTree = "<group>"; };
60C274E22C23EBE9005B67A9 /* LegacyOpenGLRenderer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyOpenGLRenderer.cpp; sourceTree = "<group>"; };
60C274E32C23EBE9005B67A9 /* LegacyOpenGLRenderer.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; path = LegacyOpenGLRenderer.h; sourceTree = "<group>"; };
940541EB2B58744500E32241 /* OpenGLShader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpenGLShader.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1290,6 +1295,8 @@
944F2F6E2B323E2100856E53 /* LocalAssetRepository.h */,
948CBF132B335A1400147E80 /* BaseAssetStorage.cpp */,
948CBF122B3359D700147E80 /* BaseAssetStorage.h */,
6055BF1F2DEA8A79005E3CFB /* BasePath.h */,
6055BF202DEA8A79005E3CFB /* BasePath.cpp */,
);
path = assets;
sourceTree = "<group>";
Expand Down Expand Up @@ -2384,6 +2391,7 @@
files = (
E517F0EA299714220036B206 /* glad.c in Sources */,
E517F0EB299714220036B206 /* nanovg.c in Sources */,
6055BF222DEA8A79005E3CFB /* BasePath.cpp in Sources */,
E517F0EC299714220036B206 /* stb_vorbis.c in Sources */,
E517F053299713DB0036B206 /* tests.cpp in Sources */,
E517F054299713DB0036B206 /* CBasicSound.cpp in Sources */,
Expand Down Expand Up @@ -2557,6 +2565,7 @@
files = (
E5890F1B29895124007A875D /* pugixml.cpp in Sources */,
E5890CFE29895118007A875D /* CSmartPart.cpp in Sources */,
6055BF232DEA8A79005E3CFB /* BasePath.cpp in Sources */,
E5890F9529895124007A875D /* nanovg.c in Sources */,
E5890CE729895118007A875D /* CShuriken.cpp in Sources */,
E5890D0E29895118007A875D /* CRosterWindow.cpp in Sources */,
Expand Down Expand Up @@ -2851,6 +2860,7 @@
E5A21A2F2DC59135007D54FF /* OpenGLShader.cpp in Sources */,
E5A21A302DC59135007D54FF /* OpenGLVertices.cpp in Sources */,
E5A21A312DC59135007D54FF /* AbstractRenderer.cpp in Sources */,
6055BF212DEA8A79005E3CFB /* BasePath.cpp in Sources */,
E5A21A322DC59135007D54FF /* CommandManager.cpp in Sources */,
E5A21A332DC59135007D54FF /* TextCommand.cpp in Sources */,
E5A21A342DC59135007D54FF /* ARGBColor.cpp in Sources */,
Expand Down
20 changes: 8 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ DEPS := $(OBJS:.o=.d)
# Alternatively set this to "NONE" for no code signing.
SIGNING_ID := NONE

avara: set-version $(BUILD_DIR)/Avara resources
avara: set-version $(BUILD_DIR)/Avara

tests: set-version $(BUILD_DIR)/tests resources
$(BUILD_DIR)/tests
tests: set-version $(BUILD_DIR)/tests
AVARA_RSRC_PATH=$(shell pwd)/ $(BUILD_DIR)/tests

bspviewer: $(BUILD_DIR)/BSPViewer resources
bspviewer: $(BUILD_DIR)/BSPViewer

levelviewer: $(BUILD_DIR)/AvaraLevelViewer resources
levelviewer: $(BUILD_DIR)/AvaraLevelViewer

hsnd2wav: set-version $(BUILD_DIR)/hsnd2wav resources
hsnd2wav: set-version $(BUILD_DIR)/hsnd2wav

frandom: $(BUILD_DIR)/frandom

Expand All @@ -124,7 +124,8 @@ macdist: macapp
winapp: avara
$(RMDIR) $(BUILD_DIR)/WinAvara
$(MKDIR_P) $(BUILD_DIR)/WinAvara
cp -r $(BUILD_DIR)/{Avara.exe,levels,rsrc} $(BUILD_DIR)/WinAvara
cp -r $(BUILD_DIR)/Avara.exe $(BUILD_DIR)/WinAvara
cp -r {levels,rsrc} ${BUILD_DIR}/WinAvara
cp /mingw64/bin/{libstdc++-6,libwinpthread-1,libgcc_s_seh-1,SDL2}.dll $(BUILD_DIR)/WinAvara

windist: winapp
Expand Down Expand Up @@ -192,9 +193,4 @@ clean-levels:
$(RM) levels/*/ogg/*.ogg
$(RM) levels/*/wav/*.wav

resources:
# python3 bin/pict2svg.py
# cp -r bsps levels rsrc shaders $(BUILD_DIR)
rsync -av levels rsrc $(BUILD_DIR)

-include $(DEPS)
4 changes: 2 additions & 2 deletions bin/winavarazip.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mkdir WinAvara
cp .\Avara.msvc\x64\Release\*.exe WinAvara
cp .\Avara.msvc\x64\Release\*.dll WinAvara
cp .\build\*.exe WinAvara
cp .\build\*.dll WinAvara
cp -r .\levels WinAvara
cp -r .\rsrc WinAvara
Compress-Archive -Path .\WinAvara -DestinationPath .\WinAvara.zip
Loading
Loading