From 7f307f9aa51dab67abb84e73f6cb22572dc13deb Mon Sep 17 00:00:00 2001 From: Allan Legemaate Date: Sat, 29 Mar 2025 11:07:37 -0400 Subject: [PATCH] chore: update build --- .github/workflows/deploy.yml | 4 +++ .github/workflows/sonar.yml | 53 ------------------------------------ CMakeLists.txt | 2 +- 3 files changed, 5 insertions(+), 54 deletions(-) delete mode 100644 .github/workflows/sonar.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2a443f7..f21286f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,6 +6,9 @@ on: - main tags: - v* + pull_request: + branches: + - main permissions: contents: read @@ -49,6 +52,7 @@ jobs: run: emmake make -j4 - uses: actions/upload-pages-artifact@v3 + if: github.ref == 'refs/heads/main' with: path: ./build diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml deleted file mode 100644 index 4fa8339..0000000 --- a/.github/workflows/sonar.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Build -on: - push: - branches: - - main - pull_request: - types: [opened, synchronize, reopened] - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - build: - name: Build - runs-on: ubuntu-latest - env: - SONAR_SCANNER_VERSION: 4.7.0.2747 - SONAR_SERVER_URL: "https://sonarcloud.io" - BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup cache - uses: actions/cache@v4 - with: - path: "_deps" - key: deps-${{ runner.os }} - - - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: libharfbuzz-dev libfreetype-dev libasound2-dev - version: 1.0 - - - name: Setup project - run: cmake . -DSDL_UNIX_CONSOLE_BUILD=ON - - - name: Install Build Wrapper - uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v5 - - - name: Run Build Wrapper - run: | - build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make -j4 - - - name: SonarQube Scan - uses: SonarSource/sonarqube-scan-action@v5 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - args: > - --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" diff --git a/CMakeLists.txt b/CMakeLists.txt index 38895d0..cb830c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -pedantic) FetchContent_Declare( asw GIT_REPOSITORY https://github.com/adsgames/asw.git - GIT_TAG v0.5.0 + GIT_TAG v0.5.4 GIT_SHALLOW TRUE ) FetchContent_MakeAvailable(asw)