Skip to content

fix: quick cleanup of schema $id #516

fix: quick cleanup of schema $id

fix: quick cleanup of schema $id #516

Workflow file for this run

name: Build
on:
push:
branches: [ "main" ]
tags: [ "v*" ]
pull_request:
workflow_dispatch:
env:
RELEASE: ${{ github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
jobs:
M:
name: Select builds
runs-on: ubuntu-latest
outputs:
RELEASE: ${{env.RELEASE}}
matrix: ${{steps.flow.outputs.matrix}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Find builds
id: flow
run: python ./flow.py run --github --matrix >> $GITHUB_OUTPUT
build:
needs: M
strategy:
matrix: ${{ fromJson(needs.M.outputs.matrix) }}
env:
BUILD_TYPE: ${{ matrix.build_type }}
CONAN_REVISIONS_ENABLED: 1
FLOW_COMMAND: python ./flow.py run --github --cutdown-os -c os=${{ matrix.os }} build_type=${{ matrix.build_type }} compiler=${{ matrix.compiler }} sanitizer=${{ matrix.sanitizer }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARTIFACT_SUFFIX: ${{ matrix.github_os }}-${{ matrix.build_type }}-${{ matrix.compiler }}${{ matrix.sanitizer && '-sanitize' || '' }}
CONAN_CACHE: ${{ matrix.github_os }}-${{ matrix.build_type }}-${{ matrix.compiler }}
runs-on: ${{ matrix.github_os }}
name: ${{ matrix.build_name }}
outputs:
RELEASE: ${{ fromJson(needs.M.outputs.RELEASE) }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
# ######## ## ## ## ## #### ######## ####### ## ## ## ## ######## ## ## ########
# ## ### ## ## ## ## ## ## ## ## ### ## ### ### ## ### ## ##
# ## #### ## ## ## ## ## ## ## ## #### ## #### #### ## #### ## ##
# ###### ## ## ## ## ## ## ######## ## ## ## ## ## ## ### ## ###### ## ## ## ##
# ## ## #### ## ## ## ## ## ## ## ## #### ## ## ## ## #### ##
# ## ## ### ## ## ## ## ## ## ## ## ### ## ## ## ## ### ##
# ######## ## ## ### #### ## ## ####### ## ## ## ## ######## ## ## ##
- name: Enable PIP3
if: ${{ matrix.ubuntu }}
run: sudo python tools/remove-externally-managed.py
- name: Install Ninja
if: ${{ matrix.ubuntu }}
run: |
sudo apt-get install ninja-build -y
- name: Install GCC 13
if: ${{ matrix.ubuntu && matrix.needs_gcc_ppa }}
run: |
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt install gcc-13 g++-13 -y
- name: Set up GCC 13
if: ${{ matrix.ubuntu }}
run: |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 130
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 130
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-13 130
sudo update-alternatives --set g++ /usr/bin/g++-13
sudo update-alternatives --set gcc /usr/bin/gcc-13
sudo update-alternatives --set gcov /usr/bin/gcov-13
- name: Set up GCC 13 as c++/cc
if: ${{ matrix.ubuntu && matrix.gcc }}
run: |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-13 130
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-13 130
sudo update-alternatives --set c++ /usr/bin/g++-13
sudo update-alternatives --set cc /usr/bin/gcc-13
- name: Install Clang 17
if: ${{ matrix.ubuntu && matrix.clang }}
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 170
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 170
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-17 170
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-17 170
sudo update-alternatives --set clang++ /usr/bin/clang++-17
sudo update-alternatives --set clang /usr/bin/clang-17
sudo update-alternatives --set c++ /usr/bin/clang++-17
sudo update-alternatives --set cc /usr/bin/clang-17
- name: Check C++ binary
if: ${{ matrix.ubuntu }}
run: |
realpath `which c++`
c++ --version
sudo locale-gen pl_PL.UTF-8 en_US.UTF-8 en_GB.UTF-8
- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.64.0
- name: Conan cache
uses: actions/cache@v4
id: cache
with:
path: ${{ matrix.home }}/.conan/data
key: ${{ env.CONAN_CACHE }}-${{ hashFiles('conanfile.txt') }}
restore-keys: |
${{ env.CONAN_CACHE }}-
- name: Install OpenCppCoverage
uses: KungFuDonkey/Install-OpenCppCoverage@v1
if: ${{ matrix.windows && matrix.build_type == 'Debug' }}
- name: Get latest archive from GitHub
run: python ./tools/download-latest.py
# ######## ######## ####### ## ######## ###### ########
# ## ## ## ## ## ## ## ## ## ## ##
# ## ## ## ## ## ## ## ## ## ##
# ######## ######## ## ## ## ###### ## ##
# ## ## ## ## ## ## ## ## ## ##
# ## ## ## ## ## ## ## ## ## ## ##
# ## ## ## ####### ###### ######## ###### ##
- name: Configure
run: ${{ env.FLOW_COMMAND }} -s Conan,CMake
- name: Build
run: ${{ env.FLOW_COMMAND }} -s Build
- name: Test
run: ${{ env.FLOW_COMMAND }} -s Test,StoreTests
- name: Pack
id: artifacts
if: ${{ fromJson(needs.M.outputs.RELEASE) }}
run: ${{ env.FLOW_COMMAND }} -s Sign,Pack,SignPackages,StorePackages
env:
SIGN_TOKEN: ${{ secrets.SIGN_TOKEN }}
# ## ## ######## ## ####### ### ########
# ## ## ## ## ## ## ## ## ## ## ##
# ## ## ## ## ## ## ## ## ## ## ##
# ## ## ######## ## ## ## ## ## ## ##
# ## ## ## ## ## ## ######### ## ##
# ## ## ## ## ## ## ## ## ## ##
# ####### ## ######## ####### ## ## ########
- name: Upload packages
uses: actions/upload-artifact@v4
if: ${{ steps.artifacts.outputs.CPACK_GENERATORS != '' }}
with:
name: _packages-${{ env.ARTIFACT_SUFFIX }}
path: ${{github.workspace}}/build/artifacts/packages/
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: _tests-${{ env.ARTIFACT_SUFFIX }}
path: ${{github.workspace}}/build/artifacts/test-results/
- name: Upload coverage
uses: actions/upload-artifact@v4
if: ${{ !fromJson(needs.M.outputs.RELEASE) }}
with:
name: _coverage-${{ env.ARTIFACT_SUFFIX }}
path: ${{github.workspace}}/build/artifacts/coverage/
merge:
name: Merge artifacts
runs-on: ubuntu-latest
needs: build
outputs:
RELEASE: ${{ fromJson(needs.build.outputs.RELEASE) }}
steps:
- name: Merge packages
uses: actions/upload-artifact/merge@v4
if: ${{ fromJson(needs.build.outputs.RELEASE) }}
with:
name: Packages
pattern: _packages-*
delete-merged: true
- name: Merge test results
uses: actions/upload-artifact/merge@v4
if: always()
with:
name: Test Results
pattern: _tests-*
delete-merged: true
- name: Merge coverage
uses: actions/upload-artifact/merge@v4
if: ${{ !fromJson(needs.build.outputs.RELEASE) }}
with:
name: Coverage
pattern: _coverage-*
delete-merged: true
publish:
name: Upload packages
if: ${{ fromJson(needs.merge.outputs.RELEASE) }}
needs: merge
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get packages
uses: actions/download-artifact@v4
with:
name: Packages
path: ${{github.workspace}}/build/download/packages
- name: Upload to release
run: python tools/release.py --upload ${{github.workspace}}/build/download/packages