Skip to content

Commit

Permalink
Merge pull request #6 from MethanePowered/develop
Browse files Browse the repository at this point in the history
Methane Asteroids v0.7.1 implemented with new RHI PIMPL classes
  • Loading branch information
egorodet authored Feb 9, 2023
2 parents 6bfe678 + 5183cc6 commit 3067f0a
Show file tree
Hide file tree
Showing 20 changed files with 721 additions and 431 deletions.
77 changes: 40 additions & 37 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ on:
env:
product_ver_major: 0
product_ver_minor: 7
product_ver_patch: 0
product_ver_patch: 1
product_ver_build: ${{ github.run_number }}
tracy_release_version: "0.8.2.1"
tracy_release_version: "0.9"

jobs:
build-asteroids:
Expand All @@ -41,60 +41,60 @@ jobs:
fail-fast: false
matrix:
include:
- os: windows-2019
- os: windows-latest
os_name: Windows
name: "Win64_DX_Release"
config_preset: "VS2019-Win64-DX-Default"
build_preset: "VS2019-Win64-DX-Release"
config_preset: "VS2022-Win64-DX-Default"
build_preset: "VS2022-Win64-DX-Release"
add_tracy_app: false

- os: windows-2019
- os: windows-latest
os_name: Windows
name: "Win64_VK_Release"
config_preset: "VS2019-Win64-VK-Default"
build_preset: "VS2019-Win64-VK-Release"
config_preset: "VS2022-Win64-VK-Default"
build_preset: "VS2022-Win64-VK-Release"
add_tracy_app: false

- os: windows-2019
- os: windows-latest
os_name: Windows
name: "Win64_DX_Profile"
config_preset: "VS2019-Win64-DX-Profile"
build_preset: "VS2019-Win64-DX-Profile"
config_preset: "VS2022-Win64-DX-Profile"
build_preset: "VS2022-Win64-DX-Profile"
add_tracy_app: true

- os: windows-2019
- os: windows-latest
os_name: Windows
name: "Win64_VK_Profile"
config_preset: "VS2019-Win64-VK-Profile"
build_preset: "VS2019-Win64-VK-Profile"
config_preset: "VS2022-Win64-VK-Profile"
build_preset: "VS2022-Win64-VK-Profile"
add_tracy_app: true

- os: windows-2019
- os: windows-latest
os_name: Windows
name: "Win32_DX_Release"
config_preset: "VS2019-Win32-DX-Default"
build_preset: "VS2019-Win32-DX-Release"
config_preset: "VS2022-Win32-DX-Default"
build_preset: "VS2022-Win32-DX-Release"
add_tracy_app: false

- os: windows-2019
- os: windows-latest
os_name: Windows
name: "Win32_VK_Release"
config_preset: "VS2019-Win32-VK-Default"
build_preset: "VS2019-Win32-VK-Release"
config_preset: "VS2022-Win32-VK-Default"
build_preset: "VS2022-Win32-VK-Release"
add_tracy_app: false

- os: windows-2019
- os: windows-latest
os_name: Windows
name: "Win32_DX_Profile"
config_preset: "VS2019-Win32-DX-Profile"
build_preset: "VS2019-Win32-DX-Profile"
config_preset: "VS2022-Win32-DX-Profile"
build_preset: "VS2022-Win32-DX-Profile"
add_tracy_app: true

- os: windows-2019
- os: windows-latest
os_name: Windows
name: "Win32_VK_Profile"
config_preset: "VS2019-Win32-VK-Profile"
build_preset: "VS2019-Win32-VK-Profile"
config_preset: "VS2022-Win32-VK-Profile"
build_preset: "VS2022-Win32-VK-Profile"
add_tracy_app: true

- os: ubuntu-latest
Expand Down Expand Up @@ -141,14 +141,18 @@ jobs:

runs-on: ${{ matrix.os }}

env:
INSTALL_DIR: Build/Output/${{ matrix.config_preset }}/Install
BUILD_LOG_FILE: Build/Output/${{ matrix.config_preset }}/Install/Build.log

steps:

- name: Install Linux prerequisites
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt install xcb libx11-dev libx11-xcb-dev libxcb-randr0-dev p7zip
run: sudo apt install xcb libx11-dev libx11-xcb-dev libxcb-sync-dev libxcb-randr0-dev p7zip

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Initialize Externals Cache
id: cache-externals
Expand All @@ -163,19 +167,18 @@ jobs:
shell: bash
run: |
set -o pipefail
mkdir -p "Build/Output/${{ matrix.config_preset }}/Install"
cmake --preset ${{ matrix.config_preset }} -DASTEROIDS_VERSION_MAJOR=${{ env.product_ver_major }} -DASTEROIDS_VERSION_MINOR=${{ env.product_ver_minor }} -DASTEROIDS_VERSION_PATCH=${{ env.product_ver_patch }} -DASTEROIDS_VERSION_BUILD=${{ env.product_ver_build }} 2>&1 | tee Build/Output/${{ matrix.config_preset }}/Install/Build.log
mkdir -p "$INSTALL_DIR"
cmake --preset ${{ matrix.config_preset }} -DASTEROIDS_VERSION_MAJOR=${{ env.product_ver_major }} -DASTEROIDS_VERSION_MINOR=${{ env.product_ver_minor }} -DASTEROIDS_VERSION_PATCH=${{ env.product_ver_patch }} -DASTEROIDS_VERSION_BUILD=${{ env.product_ver_build }} 2>&1 | tee $BUILD_LOG_FILE
- name: CMake Build Preset ${{ matrix.build_preset }}
shell: bash
run: |
set -o pipefail
cmake --build --preset ${{ matrix.build_preset }} --target install --parallel 4 2>&1 | tee -a Build/Output/${{ matrix.config_preset }}/Install/Build.log
cmake --build --preset ${{ matrix.build_preset }} --target install --parallel 4 2>&1 | tee -a $BUILD_LOG_FILE
- name: Add README and BUILD files
shell: bash
run: |
INSTALL_DIR=Build/Output/${{ matrix.config_preset }}/Install
cp README.md $INSTALL_DIR/README.md
echo Methane Asteroids v.${{ env.product_ver_major }}.${{ env.product_ver_minor }}.${{ env.product_ver_patch }}.${{ env.product_ver_build }} https://github.com/${{ github.repository }} > $INSTALL_DIR/Build-Info.txt
echo - Git repository: ${{ github.repositoryUrl }}, branch: ${{ github.ref_name }}, commit SHA: ${{ github.sha }} >> $INSTALL_DIR/Build-Info.txt
Expand All @@ -186,26 +189,26 @@ jobs:
- name: Add Windows System Information to BUILD file
if: ${{ matrix.os_name == 'Windows' }}
run: systeminfo >> Build\Output\${{ matrix.config_preset }}\Install\Build-Info.txt
run: systeminfo >> ${{ env.INSTALL_DIR }}\Build-Info.txt

- name: Add Unix System Information to BUILD file
if: ${{ matrix.os_name != 'Windows' }}
run: uname -a >>Build/Output/${{ matrix.config_preset }}/Install/Build-Info.txt
run: uname -a >>$INSTALL_DIR/Build-Info.txt

- name: Download Tracy release
if: ${{ matrix.add_tracy_app }}
shell: bash
run: |
curl -sSLo Tracy.7z https://github.com/MethanePowered/Tracy/releases/download/v${{ env.tracy_release_version }}/Tracy-${{ matrix.os_name }}-v${{ env.tracy_release_version }}.7z
7z x Tracy.7z -oBuild/Output/${{ matrix.config_preset }}/Install/Apps
7z x Tracy.7z -o$INSTALL_DIR/Apps
- name: Archive Build Artifacts
shell: bash
working-directory: Build/Output/${{ matrix.config_preset }}/Install/
working-directory: ${{ env.INSTALL_DIR }}
run: 7z a -t7z -mx=9 MethaneAsteroids_${{ matrix.name }}.7z -r- ./*.* Apps/*

- name: Upload Archived Build Artifacts
uses: actions/upload-artifact@v3
with:
name: MethaneAsteroids_${{ matrix.name }}_${{ env.product_ver_major }}.${{ env.product_ver_minor }}.${{ env.product_ver_patch }}.${{ env.product_ver_build }}
path: Build/Output/${{ matrix.config_preset }}/Install/MethaneAsteroids_${{ matrix.name }}.7z
path: ${{ env.INSTALL_DIR }}/MethaneAsteroids_${{ matrix.name }}.7z
9 changes: 8 additions & 1 deletion .gitpod.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ FROM gitpod/workspace-full-vnc
# Install Linux dependencies
USER root
RUN apt-get update \
&& apt-get -y install xcb libx11-dev libx11-xcb-dev libxcb-randr0-dev \
&& apt-get -y install wget build-essential ninja-build xcb libx11-dev libx11-xcb-dev libxcb-sync-dev libxcb-randr0-dev \
&& wget https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-linux-x86_64.sh \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /opt/cmake-3.25.2 \
&& /tmp/cmake-install.sh --skip-license --prefix=/opt/cmake-3.25.2 \
&& rm /tmp/cmake-install.sh \
&& ln -s /opt/cmake-3.25.2/bin/* /usr/local/bin \
&& apt-get clean && rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/*

USER gitpod
Loading

0 comments on commit 3067f0a

Please sign in to comment.