Skip to content

Commit

Permalink
Merge branch 'master' into task_fix_969
Browse files Browse the repository at this point in the history
  • Loading branch information
royfalk committed Jan 16, 2025
2 parents 2f4ef25 + e869f94 commit ffe2812
Show file tree
Hide file tree
Showing 77 changed files with 2,550 additions and 600 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/Windows-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ jobs:
shell: bash

- name: install-cmake
uses: lukka/get-cmake@4931ab1fc1604964c055eb330edb3f6b26ba0cfa #v3.29.2
uses: lukka/get-cmake@acb35cf920333f4dc3fc4f424f1b30d5e7d561b4 #v3.31.4
with:
cmakeVersion: 3.29.2
cmakeVersion: 3.31.4
ninjaVersion: 1.11.1

# Restore vcpkg from the GitHub Action cache service. Note that packages are restored by vcpkg's binary caching
# when it is being run afterward by CMake.
- name: restore-vcpkg
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #v4.0.2
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
with:
# The first path is the location of vcpkg: it contains the vcpkg executable and data files, as long as the
# built package archives (aka binary cache) which are located by VCPKG_DEFAULT_BINARY_CACHE env var.
Expand Down
134 changes: 134 additions & 0 deletions .github/workflows/Windows-Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
name: Windows-Release

# Controls when the action will run.
on:
release:
types:
- created
- edited

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
cmake-generator: VS2019Win64
enable-pie: 1
build-type: RelWithDebInfo
is-release: 1
- os: windows-2022
cmake-generator: VS2022Win64
enable-pie: 1
build-type: RelWithDebInfo
is-release: 1

env:
# Indicates the location of vcpkg
VCPKG_ROOT: '${{ github.workspace }}/v'
# Tells vcpkg where binary packages are stored.
VCPKG_DEFAULT_BINARY_CACHE: '${{ github.workspace }}/vbincache'
# Let's use GitHub Action cache as storage for the vcpkg Binary Caching feature.
VCPKG_BINARY_SOURCES: 'x-gha,readwrite'
VCPKG_DEFAULT_TRIPLET: x64-windows
VCPKG_DEFAULT_HOST_TRIPLET: x64-windows
TAG_NAME: '${{ github.ref_name }}'

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Set env vars needed for vcpkg to leverage the GitHub Action cache as a storage
# for Binary Caching.
# Also process the `github.sha` value to produce the SHORT_SHA we'll need later
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
with:
script: |
const git_sha = context.sha.substring(0, 7)
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
core.exportVariable('SHORT_SHA', git_sha);
- name: Test tag name and short SHA
run: |
echo "${TAG_NAME}"
echo "${SHORT_SHA}"
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.11

- name: "Create directory '${{ env.VCPKG_DEFAULT_BINARY_CACHE }}'"
run: mkdir -p $VCPKG_DEFAULT_BINARY_CACHE
shell: bash

- name: install-cmake
uses: lukka/get-cmake@acb35cf920333f4dc3fc4f424f1b30d5e7d561b4 #v3.31.4
with:
cmakeVersion: 3.31.4
ninjaVersion: 1.11.1

# Restore vcpkg from the GitHub Action cache service. Note that packages are restored by vcpkg's binary caching
# when it is being run afterward by CMake.
- name: restore-vcpkg
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0
with:
# The first path is the location of vcpkg: it contains the vcpkg executable and data files, as long as the
# built package archives (aka binary cache) which are located by VCPKG_DEFAULT_BINARY_CACHE env var.
# The other paths starting with '!' are exclusions: they contain temporary files generated during the build of the installed packages.
path: |
${{ env.VCPKG_ROOT }}
!${{ env.VCPKG_ROOT }}/buildtrees
!${{ env.VCPKG_ROOT }}/packages
!${{ env.VCPKG_ROOT }}/downloads
!${{ env.VCPKG_ROOT }}/installed
# The key is composed in a way that it gets properly invalidated whenever a different version of vcpkg is being used.
key: |
${{ matrix.os }}-${{ hashFiles( './engine/vcpkg.json' )}}
- name: install-vcpkg
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone https://github.com/Microsoft/vcpkg.git ${{ env.VCPKG_ROOT }}
${{ env.VCPKG_ROOT }}\bootstrap-vcpkg.bat -disableMetrics
- name: run-build-script
working-directory: ${{ github.workspace }}
run: .\script\build.ps1 -Generator ${{ matrix.cmake-generator }} -EnablePIE ${{ matrix.enable-pie }} -BuildType ${{ matrix.build-type }} -IsRelease ${{ matrix.is-release }} -GitTag ${{ env.TAG_NAME }} -GitSha ${{ env.SHORT_SHA }}

- name: Test
working-directory: ${{ github.workspace }}
env:
GTEST_OUTPUT: xml
GTEST_COLOR: 1
run: .\script\test.ps1 -Generator ${{ matrix.cmake-generator }} -EnablePIE ${{ matrix.enable-pie }} -BuildType ${{ matrix.build-type }}

- name: Upload test results
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
if: failure()
with:
name: test_results_xml
path: ${{github.workspace}}/build/test-results/**/*.xml

- name: Package the installer(s)
working-directory: ${{ github.workspace }}
run: .\script\package.ps1 -Generator ${{ matrix.cmake-generator }} -EnablePIE ${{ matrix.enable-pie }} -BuildType ${{ matrix.build-type }} -GitTag ${{ env.TAG_NAME }} -GitSha ${{ env.SHORT_SHA }}

- name: Upload the artifacts
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: "packages/*.*"
2 changes: 1 addition & 1 deletion .github/workflows/fortify-on-demand-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
scan:
# The type of runner that the job will run on
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-actions-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
continue-on-error: true

defaults:
Expand Down
37 changes: 31 additions & 6 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
continue-on-error: true
continue-on-error: false

defaults:
run:
Expand All @@ -25,16 +25,36 @@ jobs:
- macos-13
# M1 processor
#- macos-14
python-version:
#- 3.12.8
- 3.13.1
compiler:
- clang
- gcc
- AppleClang
#- clang
#- gcc
homebrew-gl:
- true
#- false
homebrew-al:
- true
#- false
ENABLE_PIE:
- 'ON'
#- 'OFF'
build-type:
- RelWithDebInfo

steps:
# specific setup for Python on Mac to ensure Python Version align
- name: Python Setup on Mac
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
id: vega-py-setup
with:
python-version: 3.12.8
python-version: ${{ matrix.python-version }}
update-environment: true # false

- name: Install dependencies using homebrew
run: brew install boost-python3 gtk+3 gtkglext sdl libvorbis

# The following dependencies are already present within macos-* images:
# MacOS has a Developers Tools package from Apple that gets installed which
Expand Down Expand Up @@ -64,8 +84,13 @@ jobs:
env:
MY_OS_NAME: macos
COMPILER: ${{ matrix.compiler }}
FLAGS: -DCMAKE_FIND_FRAMEWORK=LAST
FLAGS: "-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_FIND_FRAMEWORK=LAST -DENABLE_PIE=${{ matrix.ENABLE_PIE }} -DPython3_ROOT_DIR=${{ matrix.vega-py-setup.outputs.python-path }} -DPythonInstalledVia=Homebrew"
OPENALDIR: "/usr/local/opt/openal-soft"
Python3_ROOT_DIR: ${{ matrix.vega-py-setup.outputs.python-path }}
Python_ROOT_DIR: ${{ matrix.vega-py-setup.outputs.python-path }}
pythonLocation: ${{ matrix.vega-py-setup.outputs.python-path }}
PYTHONHOME: ""
PYTHONPATH: ""
run: script/cibuild $FLAGS

- name: Test
Expand All @@ -76,7 +101,7 @@ jobs:
run: ctest -V

- name: Upload test results
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
if: failure()
with:
name: test_results_xml
Expand Down
140 changes: 140 additions & 0 deletions .github/workflows/macos-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: 'MacOS-Release'

on:
release:
types:
- created
- edited

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
continue-on-error: true

defaults:
run:
shell: bash

strategy:
fail-fast: false
matrix:
os:
# x86-64
- macos-13
# M1 processor
#- macos-14
python-version:
#- 3.12.8
- 3.13.1
compiler:
- AppleClang
#- clang
#- gcc
homebrew-gl:
- true
#- false
homebrew-al:
- true
#- false
ENABLE_PIE:
- 'ON'
#- 'OFF'
build-type:
- RelWithDebInfo

steps:

# The following dependencies are already present within macos-* images:
# - clang (llvm)
# - cmake
# - expat
# - gcc
# - git
# - jpeg
# - libpng
# - ~libvorbis~
# - python
# specific setup for Python on Mac to ensure Python Version align
- name: Python Setup on Mac
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
id: vega-py-setup
with:
python-version: ${{ matrix.python-version }}
update-environment: true # false

- name: Install dependencies using homebrew
run: brew install boost-python3 gtk+3 gtkglext sdl libvorbis

# The following Apple-provided libraries are deprecated:
# * OpenGL as of macOS 10.14
# * GLUT as of macOS 10.9
- name: Optionally install homebrewed OpenGL and GLUT
if: ${{ matrix.homebrew-gl }}
run: |
brew install mesa mesa-glu freeglut
ln -s "$(brew --prefix)/include/GL" "$(brew --prefix)/include/OpenGL"
ln -s "$(brew --prefix)/include/GL" "$(brew --prefix)/include/GLUT"
# The Apple-provided OpenAL is deprecated as of macOS 10.15
- name: Optionally install homebrewed OpenAL
if: ${{ matrix.homebrew-al }}
run: brew install openal-soft

- name: Check out repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 2
submodules: false

- name: Extract tag name and short SHA
shell: bash
run: |
echo "TAG_NAME=$(echo ${GITHUB_REF#refs/tags/} | sed 's/\//_/g')" >> $GITHUB_ENV
echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV
- name: Test tag name and short SHA
run: |
echo "${TAG_NAME}"
echo "${SHORT_SHA}"
- name: Build it
env:
MY_OS_NAME: macos
COMPILER: ${{ matrix.compiler }}
FLAGS: "-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_FIND_FRAMEWORK=LAST -DENABLE_PIE=${{ matrix.ENABLE_PIE }} -DPython3_ROOT_DIR=${{ matrix.vega-py-setup.outputs.python-path }} -DPythonInstalledVia=Homebrew"
OPENALDIR: "$(brew --prefix)/opt/openal-soft"
Python3_ROOT_DIR: ${{ matrix.vega-py-setup.outputs.python-path }}
Python_ROOT_DIR: ${{ matrix.vega-py-setup.outputs.python-path }}
pythonLocation: ${{ matrix.vega-py-setup.outputs.python-path }}
PYTHONHOME: ""
PYTHONPATH: ""
IS_RELEASE: 1
run: script/cibuild $FLAGS

- name: Test
working-directory: ${{github.workspace}}/build
env:
GTEST_OUTPUT: xml
GTEST_COLOR: 1
run: ctest -V

- name: Upload test results
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
if: failure()
with:
name: test_results_xml
path: ${{github.workspace}}/build/test-results/**/*.xml

- name: Package it
working-directory: ${{github.workspace}}/build
run: cpack -V

- name: Upload the artifacts
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: "packages/*.*"
2 changes: 1 addition & 1 deletion .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions: read-all
jobs:
analysis:
name: Scorecards analysis
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
Expand Down
Loading

0 comments on commit ffe2812

Please sign in to comment.