Skip to content

Bump actions/setup-java from 3 to 4 #57

Bump actions/setup-java from 3 to 4

Bump actions/setup-java from 3 to 4 #57

Workflow file for this run

name: Build
on:
push:
paths:
- '.github/workflows/Build.yml'
- '.github/workflows/CodeQL.yml'
- '.github/workflows/Test.yml'
- 'CMake**'
- 'Libs/**'
- 'Source/**.cpp'
- 'Source/**.hpp'
- 'Test/**'
- '**.cmake'
- '**.g4'
pull_request:
paths:
- '.github/workflows/Build.yml'
- '.github/workflows/CodeQL.yml'
- '.github/workflows/Test.yml'
- 'CMake**'
- 'Libs/**'
- 'Source/**.cpp'
- 'Source/**.hpp'
- 'Test/**'
- '**.cmake'
- '**.g4'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
defaults:
run:
shell: bash
env:
GHA_BUILD_DIR: "Build"
GHA_BUILD_CFG: "Release"
jobs:
Build:
runs-on: ${{ matrix.cfg.os }}
name: ${{ matrix.cfg.name }}
strategy:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-latest, name: GCC, cc: gcc, cxx: g++, artifacts-dir: prs-linux }
- { os: ubuntu-latest, name: Clang, cc: clang, cxx: clang++, artifacts-dir: false }
- { os: windows-2019, name: VS2019, cc: cl, cxx: cl, artifacts-dir: false }
- { os: windows-2022, name: VS2022, cc: cl, cxx: cl, artifacts-dir: prs-windows }
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Java setup
if: runner.os == 'Windows'
uses: actions/setup-java@v4
with:
java-version: 16
distribution: 'microsoft'
- name: Build configuration
run: cmake -B ${{ env.GHA_BUILD_DIR }}
env:
CC: ${{ matrix.cfg.cc }}
CXX: ${{ matrix.cfg.cxx }}
ARTIFACTS_DIR: ${{ matrix.cfg.artifacts-dir }}
- name: Build
run: cmake --build ${{ env.GHA_BUILD_DIR }} --config ${{ env.GHA_BUILD_CFG }}
- name: Upload artifacts
if: ${{ matrix.cfg.artifacts-dir }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.cfg.artifacts-dir }}
path: ${{ matrix.cfg.artifacts-dir }}/
retention-days: 7
if-no-files-found: error
# note to self: GitHub UI ignores reusable workflow name and uses job name below instead
Test:
needs: Build
uses: ./.github/workflows/Test.yml
CodeQL:
needs: Build
uses: ./.github/workflows/CodeQL.yml
permissions:
security-events: write