Fixed declaration of static constants, and their resolution in array access expressions. #383
Workflow file for this run
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
name: Build | |
on: | |
push: | |
branches: | |
- development | |
- master | |
pull_request: | |
branches: | |
- development | |
- master | |
release: | |
types: | |
- created | |
jobs: | |
build-windows: | |
strategy: | |
matrix: | |
os: [[windows-latest,x64-windows,msvc]] | |
buildType: [Release] | |
runs-on: ${{ matrix.os[0] }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout submodules | |
run: | | |
git submodule update --init -- "CMake" | |
git submodule update --init -- "external/vcpkg" | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v10 | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/external/vcpkg' | |
vcpkgJsonGlob: 'vcpkg.json' | |
runVcpkgInstall: true | |
- name: Create Build Environment | |
run: | | |
cmake -E make_directory ${{runner.workspace}}/build-${{ matrix.buildType }} | |
- name: Configure Warnings as errors (OFF) | |
if: (github.event_name == 'push') | |
shell: bash | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
run: | | |
echo "PROJ_WAE=OFF" >> $GITHUB_ENV | |
- name: Configure Warnings as errors (ON) | |
if: (github.event_name != 'push') | |
shell: bash | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
run: | | |
echo "PROJ_WAE=ON" >> $GITHUB_ENV | |
- name: Configure CMake | |
id: configure | |
shell: bash | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
run: | | |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} --preset ci -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE | |
- name: Build | |
if: (steps.configure.conclusion == 'success') | |
id: build | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
shell: bash | |
run: | | |
cmake --build . --parallel 2 --config ${{ matrix.buildType }} | |
- name: Test | |
if: (steps.build.conclusion == 'success') | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
shell: bash | |
run: | | |
ctest -C ${{ matrix.buildType }} | |
- name: Prepare success package | |
if: (github.event_name == 'push') && (steps.build.conclusion == 'success') | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
shell: bash | |
run: | | |
cmake --install . --config ${{ matrix.buildType }} | |
7z a $GITHUB_WORKSPACE/ShaderWriter-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/ShaderWriter/ | |
- name: Clean build folder | |
if: (steps.build.conclusion == 'success') | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
shell: bash | |
run: | | |
cmake --build . --config ${{ matrix.buildType }} --target clean | |
- name: Upload success package | |
if: (github.event_name == 'push') && (steps.build.conclusion == 'success') | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ShaderWriter-${{ matrix.os[1] }}.zip | |
path: ${{ github.workspace }}/ShaderWriter-${{ matrix.os[1] }}.zip | |
build-macos: | |
strategy: | |
matrix: | |
os: [[macos-latest,x64-osx,clang]] | |
buildType: [Release] | |
runs-on: ${{ matrix.os[0] }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout submodules | |
run: | | |
git submodule update --init -- "CMake" | |
git submodule update --init -- "external/vcpkg" | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v10 | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/external/vcpkg' | |
vcpkgJsonGlob: 'vcpkg.json' | |
runVcpkgInstall: true | |
- name: Create Build Environment | |
run: | | |
cmake -E make_directory ${{runner.workspace}}/build-${{ matrix.buildType }} | |
- name: Configure Warnings as errors (OFF) | |
if: (github.event_name == 'push') | |
shell: bash | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
run: | | |
echo "PROJ_WAE=OFF" >> $GITHUB_ENV | |
- name: Configure Warnings as errors (ON) | |
if: (github.event_name != 'push') | |
shell: bash | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
run: | | |
echo "PROJ_WAE=ON" >> $GITHUB_ENV | |
- name: Configure CMake | |
id: configure | |
shell: bash | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
run: | | |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} --preset ci -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE | |
- name: Build | |
if: (steps.configure.conclusion == 'success') | |
id: build | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
shell: bash | |
run: | | |
cmake --build . --parallel 2 --config ${{ matrix.buildType }} | |
- name: Prepare success package | |
if: (github.event_name == 'push') && (steps.build.conclusion == 'success') | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
shell: bash | |
run: | | |
cmake --install . --config ${{ matrix.buildType }} | |
7z a $GITHUB_WORKSPACE/ShaderWriter-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/ShaderWriter/ | |
- name: Clean build folder | |
if: (steps.build.conclusion == 'success') | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
shell: bash | |
run: | | |
cmake --build . --config ${{ matrix.buildType }} --target clean | |
- name: Upload success package | |
if: (github.event_name == 'push') && (steps.build.conclusion == 'success') | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ShaderWriter-${{ matrix.os[1] }}.zip | |
path: ${{ github.workspace }}/ShaderWriter-${{ matrix.os[1] }}.zip | |
build-linux-clang: | |
strategy: | |
matrix: | |
os: [[ubuntu-latest,x64-linux,clang]] | |
buildType: [Release] | |
runs-on: ${{ matrix.os[0] }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout submodules | |
run: | | |
git submodule update --init -- "CMake" | |
git submodule update --init -- "external/vcpkg" | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v10 | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/external/vcpkg' | |
vcpkgJsonGlob: 'vcpkg.json' | |
runVcpkgInstall: true | |
- name: Install necessary Clang++ version | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends ccache clang-14 clang++-14 | |
echo "CC=clang-14" >> $GITHUB_ENV | |
echo "CXX=clang++-14" >> $GITHUB_ENV | |
- name: Create Build Environment | |
run: | | |
cmake -E make_directory ${{runner.workspace}}/build-${{ matrix.buildType }} | |
- name: Configure Warnings as errors (OFF) | |
if: (github.event_name == 'push') | |
shell: bash | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
run: | | |
echo "PROJ_WAE=OFF" >> $GITHUB_ENV | |
- name: Configure Warnings as errors (ON) | |
if: (github.event_name != 'push') | |
shell: bash | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
run: | | |
echo "PROJ_WAE=ON" >> $GITHUB_ENV | |
- name: Configure CMake | |
id: configure | |
shell: bash | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
run: | | |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} --preset ci -DPROJECTS_WARNINGS_AS_ERRORS=$PROJ_WAE | |
- name: Build | |
if: (steps.configure.conclusion == 'success') | |
id: build | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
shell: bash | |
run: | | |
cmake --build . --parallel 2 --config ${{ matrix.buildType }} | |
- name: Test | |
if: (steps.build.conclusion == 'success') | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
shell: bash | |
run: | | |
ctest -C ${{ matrix.buildType }} | |
- name: Prepare success package | |
if: (github.event_name == 'push') && (steps.build.conclusion == 'success') | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
shell: bash | |
run: | | |
cmake --install . --config ${{ matrix.buildType }} | |
7z a $GITHUB_WORKSPACE/ShaderWriter-${{ matrix.os[1] }}.zip $GITHUB_WORKSPACE/package/ShaderWriter/ | |
- name: Clean build folder | |
if: (steps.build.conclusion == 'success') | |
working-directory: ${{runner.workspace}}/build-${{ matrix.buildType }} | |
shell: bash | |
run: | | |
cmake --build . --config ${{ matrix.buildType }} --target clean | |
- name: Upload success package | |
if: (github.event_name == 'push') && (steps.build.conclusion == 'success') | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ShaderWriter-${{ matrix.os[1] }}.zip | |
path: ${{ github.workspace }}/ShaderWriter-${{ matrix.os[1] }}.zip |