From d954308b924f417f1c15060e42bae2bd9a421d61 Mon Sep 17 00:00:00 2001 From: Kate Martin <51387586+renanthera@users.noreply.github.com> Date: Thu, 1 Jan 2026 19:23:48 -0700 Subject: [PATCH 1/8] [ci] (attempt to) Prevent automated generated file regeneration on non-default branches. --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e74ed68ff94..6e9d9368570 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -152,7 +152,7 @@ jobs: spec-test: needs: [ubuntu-clang-build] - if: github.ref_name == 'thewarwithin' || github.ref_name == 'midnight' + if: github.ref == github.event.repository.defaultBranchRef || github.ref_name == 'midnight' uses: ./.github/workflows/spec_test.yml with: cache-key: ubuntu-clang++-15-for_run-${{ github.sha }}-cpp-17 @@ -171,7 +171,7 @@ jobs: name: Update Generated Files needs: [spec-test] runs-on: ubuntu-22.04 - if: github.event_name == 'push' && ( success() || failure() ) && github.repository == 'simulationcraft/simc' + if: github.event_name == 'push' && ( success() || failure() ) && github.repository == 'simulationcraft/simc' && github.ref == github.event.repository.defaultBranchRef steps: - uses: actions/cache@v4 @@ -241,7 +241,7 @@ jobs: ubuntu-run: needs: [ubuntu-clang-build, ubuntu-gcc-build] - if: github.ref_name == 'thewarwithin' + if: github.ref == github.event.repository.defaultBranchRef uses: ./.github/workflows/ubuntu_run.yml with: cache-sha: ${{ github.sha }} @@ -256,7 +256,7 @@ jobs: run: make SANITIZE=1 -C engine debug -j 2 - name: Smoke Test - if: github.ref_name == 'thewarwithin' + if: github.ref == github.event.repository.defaultBranchRef run: ./engine/simc $SIMC_PROFILE iterations=5 output=/dev/null html=/dev/null json2=/dev/null cleanup_threads=1 windows-VS: From 1790d26ff293c9b71ecd444decb2fadef433f22f Mon Sep 17 00:00:00 2001 From: Kate Martin <51387586+renanthera@users.noreply.github.com> Date: Fri, 2 Jan 2026 12:08:17 -0700 Subject: [PATCH 2/8] [ci] Split out update-generated-files workflow. Fix reference name. --- .github/workflows/generate_files.yml | 78 ++++++++ .github/workflows/main.yml | 272 ++------------------------- 2 files changed, 96 insertions(+), 254 deletions(-) create mode 100644 .github/workflows/generate_files.yml diff --git a/.github/workflows/generate_files.yml b/.github/workflows/generate_files.yml new file mode 100644 index 00000000000..33c560e6d1e --- /dev/null +++ b/.github/workflows/generate_files.yml @@ -0,0 +1,78 @@ +name: generate-files + +on: + workflow_call: + inputs: + cache-sha: + type: string + required: true + +jobs: + update-generated-files: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/cache@v4 + id: cache + with: + path: | + ${{ runner.workspace }}/b/ninja/simc + profiles + tests + generate_profiles_ci.sh + .git + key: ubuntu-clang++-15-for_run-${{ inputs.cache-sha }}-cpp-17 + + - uses: actions/checkout@v4 + + - name: Setup + run: echo "SHORT_SHA=$(git rev-parse --short ${{ inputs.cache-sha }})" >> $GITHUB_ENV + + - name: Generate APL Modules + if: steps.cache.outputs.cache-hit == 'true' + env: + SIMC_CLI_PATH: ${{ runner.workspace }}/b/ninja/simc + run: ${{ github.workspace }}/generate_apl_modules_ci.sh + + - name: Download APL Dumps + uses: actions/download-artifact@v4 + with: + path: ActionPriorityLists + pattern: apl-${{ inputs.cache-sha }}-* + merge-multiple: true + + - name: Generate Profiles + if: steps.cache.outputs.cache-hit == 'true' + continue-on-error: true + env: + SIMC_CLI_PATH: ${{ runner.workspace }}/b/ninja/simc + run: ${{ github.workspace }}/generate_profiles_ci.sh + + - name: Dump Spell Data + if: steps.cache.outputs.cache-hit == 'true' + env: + SIMC_CLI_PATH: ${{ runner.workspace }}/b/ninja/simc + run: ${{ github.workspace}}/SpellDataDump/spelldatadump_ci.sh + + - name: Check for Non-Trivial Changes + run: | + if [ "$(git ls-files -m)" = "SpellDataDump/build_info.txt" ]; then + git checkout -- SpellDataDump/build_info.txt + fi + + - name: Commit Updated Files + continue-on-error: true + uses: EndBug/add-and-commit@v9 + with: + message: "Update Generated Files ${{ env.SHORT_SHA }}" + default_author: github_actions + fetch: --no-tags --force --prune --no-recurse-submodules --depth=1 origin ${{ github.ref_name }} + add: | + - "engine/class_modules/apl" + - "*.simc" + - "*.txt" + + - name: Cleanup APL Dumps + uses: geekyeggo/delete-artifact@v5 + with: + name: apl-${{ inputs.cache-sha }}-* diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e9d9368570..97e3a9bd306 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,146 +13,24 @@ on: env: SIMC_PROFILE: profiles/CI.simc - RUN_BINARY_CACHE: ubuntu-clang++-15-for_run-${{ github.sha }}-cpp-17 - CCACHE_COMPRESS: true # always enable ccache compression - ccache-generation: 0 # bump if you need to "clean" ccache + CCACHE_GENERATION: 0 # bump if you need to "clean" ccache jobs: - ubuntu-gcc-build: - name: ubuntu-${{ matrix.compiler }}-cpp${{ matrix.cppVersion }}-build - runs-on: ${{ matrix.os }} - strategy: - matrix: - compiler: [gcc-12, gcc-14] - cppVersion: [17, 20] - include: - - compiler: gcc-12 - cxx: g++-12 - packages: gcc-12 g++-12 - os: ubuntu-22.04 - - compiler: gcc-14 - cxx: g++-14 - packages: gcc-14 g++-14 - os: ubuntu-24.04 - - steps: - - uses: actions/checkout@v4 - - - uses: actions/cache@v4 - env: - { - ccache-prefix: "ubuntu-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-ccache-${{ env.ccache-generation }}", - } - with: - path: ${{ runner.workspace }}/.ccache - key: ${{ env.ccache-prefix }}-${{ github.sha }} - restore-keys: ${{ env.ccache-prefix }}- - - - name: Install deps - run: | - sudo apt-get update - sudo apt-get install -y libcurl4-openssl-dev ninja-build ccache ${{ matrix.packages }} - - - name: Configure - run: - cmake -H. -B'${{ runner.workspace }}/b/ninja' -GNinja -DBUILD_GUI=OFF - -DCMAKE_BUILD_TYPE=Debug - -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DCMAKE_C_COMPILER=${{ matrix.compiler }} - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - -DCMAKE_CXX_STANDARD=${{ matrix.cppVersion }} - - - name: Build - env: - CCACHE_BASEDIR: ${{ runner.workspace }} - CCACHE_DIR: ${{ runner.workspace }}/.ccache - CCACHE_MAXSIZE: 192M # full build consumes around ~80, ~2x that to be safe - run: | - ccache -z - ninja -C '${{ runner.workspace }}/b/ninja' - ccache -s - - - uses: actions/cache@v4 - with: - path: | - ${{ runner.workspace }}/b/ninja/simc - profiles - tests - generate_profiles_ci.sh - .git - key: ubuntu-${{ matrix.compiler }}-for_run-${{ github.sha }}-cpp-${{ matrix.cppVersion }} - - ubuntu-clang-build: - name: ubuntu-build-${{ matrix.compiler }}-C++${{ matrix.cppVersion }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - cppVersion: [17, 20] - compiler: [clang++-15, clang++-18] - include: - - compiler: clang++-15 - os: ubuntu-22.04 - packages: clang-15 lld-15 - enable_file_prefix_map: true - - compiler: clang++-18 - os: ubuntu-24.04 - packages: clang-18 lld-18 - enable_file_prefix_map: true - + test-job: + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - - uses: actions/cache@v4 - env: - { - ccache-prefix: "ubuntu-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-ccache-${{ env.ccache-generation }}", - } - with: - path: ${{ runner.workspace }}/.ccache - key: ${{ env.ccache-prefix }}-${{ github.sha }} - restore-keys: ${{ env.ccache-prefix }}- - - - name: Install deps - run: | - sudo apt-get update - sudo apt-get install -y libcurl4-openssl-dev ninja-build ccache ${{ matrix.packages }} - - - name: Configure - env: - UBSAN_STRIP_COUNT: '`echo "${{ runner.workspace }}//" | grep -o ''/'' - | wc -l`' + - name: Test run: - cmake -H. -B'${{ runner.workspace }}/b/ninja' -GNinja -DBUILD_GUI=OFF - -DCMAKE_BUILD_TYPE=Debug - -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} - -DCMAKE_CXX_FLAGS="-Og ${{ matrix.enable_file_prefix_map && format('-ffile-prefix-map={0}/=/', runner.workspace) || ''}} - -fno-omit-frame-pointer -fsanitize=address,undefined - -fsanitize-undefined-strip-path-components=$UBSAN_STRIP_COUNT" - -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld -fsanitize=address,undefined" - -DCMAKE_CXX_STANDARD=${{ matrix.cppVersion }} - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - - - name: Build - env: - CCACHE_BASEDIR: ${{ runner.workspace }} - CCACHE_DIR: ${{ runner.workspace }}/.ccache - CCACHE_MAXSIZE: 256M # full build consumes around ~124, ~2x that to be safe - run: | - ccache -z - ninja -C '${{ runner.workspace }}/b/ninja' - ccache -s + echo "${{github.ref}} ${{github.event.repository.default_branch}} ${{github.ref_name}} ${{github.base_ref}} ${{github.head_ref}}" - - uses: actions/cache@v4 - with: - path: | - ${{ runner.workspace }}/b/ninja/simc - profiles - tests - generate_profiles_ci.sh - .git - key: ubuntu-${{ matrix.compiler }}-for_run-${{ github.sha }}-cpp-${{ matrix.cppVersion }} + build: + uses: ./.github/workflows/build.yml + with: + cache-sha: ${{ github.sha }} spec-test: needs: [ubuntu-clang-build] - if: github.ref == github.event.repository.defaultBranchRef || github.ref_name == 'midnight' + if: github.base_ref == github.event.repository.default_branch || github.base_ref == 'midnight' uses: ./.github/workflows/spec_test.yml with: cache-key: ubuntu-clang++-15-for_run-${{ github.sha }}-cpp-17 @@ -167,131 +45,17 @@ jobs: cache-sha: ${{ github.sha }} is-ptr: true - update-generated-files: - name: Update Generated Files - needs: [spec-test] - runs-on: ubuntu-22.04 - if: github.event_name == 'push' && ( success() || failure() ) && github.repository == 'simulationcraft/simc' && github.ref == github.event.repository.defaultBranchRef - - steps: - - uses: actions/cache@v4 - id: cache - with: - path: | - ${{ runner.workspace }}/b/ninja/simc - profiles - tests - generate_profiles_ci.sh - .git - key: ubuntu-clang++-15-for_run-${{ github.sha }}-cpp-17 - - - uses: actions/checkout@v4 - - - name: Setup - run: echo "SHORT_SHA=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV - - - name: Generate APL Modules - if: steps.cache.outputs.cache-hit == 'true' - env: - SIMC_CLI_PATH: ${{ runner.workspace }}/b/ninja/simc - run: ${{ github.workspace }}/generate_apl_modules_ci.sh - - - name: Download APL Dumps - uses: actions/download-artifact@v4 - with: - path: ActionPriorityLists - pattern: apl-${{ github.sha }}-* - merge-multiple: true - - - name: Generate Profiles - if: steps.cache.outputs.cache-hit == 'true' - continue-on-error: true - env: - SIMC_CLI_PATH: ${{ runner.workspace }}/b/ninja/simc - run: ${{ github.workspace }}/generate_profiles_ci.sh - - - name: Dump Spell Data - if: steps.cache.outputs.cache-hit == 'true' - env: - SIMC_CLI_PATH: ${{ runner.workspace }}/b/ninja/simc - run: ${{ github.workspace}}/SpellDataDump/spelldatadump_ci.sh - - - name: Check for Non-Trivial Changes - run: | - if [ "$(git ls-files -m)" = "SpellDataDump/build_info.txt" ]; then - git checkout -- SpellDataDump/build_info.txt - fi - - - name: Commit Updated Files - continue-on-error: true - uses: EndBug/add-and-commit@v9 - with: - message: "Update Generated Files ${{ env.SHORT_SHA }}" - default_author: github_actions - fetch: --no-tags --force --prune --no-recurse-submodules --depth=1 origin ${{ github.ref_name }} - add: | - - "engine/class_modules/apl" - - "*.simc" - - "*.txt" - - - name: Cleanup APL Dumps - uses: geekyeggo/delete-artifact@v5 - with: - name: apl-${{ github.sha }}-* - ubuntu-run: needs: [ubuntu-clang-build, ubuntu-gcc-build] - if: github.ref == github.event.repository.defaultBranchRef + if: github.base_ref == github.event.repository.default_branch || github.base_ref == 'midnight' uses: ./.github/workflows/ubuntu_run.yml with: cache-sha: ${{ github.sha }} - build-osx: - name: macos-latest - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - - name: Build - run: make SANITIZE=1 -C engine debug -j 2 - - - name: Smoke Test - if: github.ref == github.event.repository.defaultBranchRef - run: ./engine/simc $SIMC_PROFILE iterations=5 output=/dev/null html=/dev/null json2=/dev/null cleanup_threads=1 - - windows-VS: - name: windows-VS-${{ matrix.vs }}-${{ matrix.arch }} - runs-on: windows-latest - strategy: - matrix: - vs: [2019] - arch: [x64, amd64_arm64] - include: - - arch: x64 - runSmokeTest: false # disable smoke test for now, as it seems to hang the workflow indefinitely on assert, instead of failing. - - env: - CMAKE_BUILD_DIR: ${{ github.workspace }}/builddir/ - - steps: - - uses: actions/checkout@v4 - - # Setup the build machine with the most recent versions of CMake and Ninja. Both are cached if not already: on subsequent runs both will be quickly restored from GitHub cache service. - - uses: lukka/get-cmake@latest - - # On Windows runners, let's ensure to have the Developer Command Prompt environment setup correctly. As used here the Developer Command Prompt created is targeting x64 and using the default the Windows SDK. - - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: ${{ matrix.arch }} - - - name: Generate project files - run: | - cmake -B "${{ env.CMAKE_BUILD_DIR }}" -GNinja -DBUILD_GUI=OFF -DCMAKE_BUILD_TYPE=Debug - - - name: Build - run: | - cmake --build "${{ env.CMAKE_BUILD_DIR }}" - - - name: Smoke Test - if: matrix.runSmokeTest - run: ${{ env.CMAKE_BUILD_DIR }}/simc.exe $env:SIMC_PROFILE iterations=5 output=nul html=nul json2=nul cleanup_threads=1 + update-generated-files: + needs: [spec-test] + if: github.event_name == 'push' && ( success() || failure() ) && github.repository == 'simulationcraft/simc' && github.base_ref == github.event.repository.default_branch + uses: ./.github/workflows/generate_files.yml + with: + cache-sha: ${{ github.sha }} + do-test: github.base_ref == github.event.repository.default_branchy || github.base_ref == 'midnight' From 02893b03c58b6e7591a501132281ca98028515cd Mon Sep 17 00:00:00 2001 From: Kate Martin <51387586+renanthera@users.noreply.github.com> Date: Sat, 3 Jan 2026 16:18:28 -0700 Subject: [PATCH 3/8] [ci] Split build into workflow. --- .github/workflows/build.yml | 197 ++++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 10 +- 2 files changed, 202 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000000..76dd478f609 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,197 @@ +name: build + +on: + workflow_call: + inputs: + cache-sha: + type: string + required: true + do-test: + type: boolean + required: true + +jobs: + test-job-2: + runs-on: ubuntu-22.04 + steps: + - name: Test-2 + run: + echo "${{github.event.repository.default_branch}} ${{github.base_ref}} ${{github.sha}}" + + ubuntu-gcc-build: + name: ubuntu-${{ matrix.compiler }}-cpp${{ matrix.cppVersion }}-build + runs-on: ${{ matrix.os }} + strategy: + matrix: + compiler: [gcc-12, gcc-14] + cppVersion: [17, 20] + include: + - compiler: gcc-12 + cxx: g++-12 + packages: gcc-12 g++-12 + os: ubuntu-22.04 + - compiler: gcc-14 + cxx: g++-14 + packages: gcc-14 g++-14 + os: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - uses: actions/cache@v4 + env: + CCACHE_PREFIX: "ubuntu-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-ccache-${{ env.CCACHE_GENERATION }}" + with: + path: ${{ runner.workspace }}/.ccache + key: ${{ env.CCACHE_PREFIX }}-${{ inputs.cache-sha }} + restore-keys: ${{ env.CCACHE_PREFIX }}- + + - name: Install deps + run: | + sudo apt-get update + sudo apt-get install -y libcurl4-openssl-dev ninja-build ccache ${{ matrix.packages }} + + - name: Configure + run: + cmake -H. -B'${{ runner.workspace }}/b/ninja' -GNinja -DBUILD_GUI=OFF + -DCMAKE_BUILD_TYPE=Debug + -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DCMAKE_C_COMPILER=${{ matrix.compiler }} + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + -DCMAKE_CXX_STANDARD=${{ matrix.cppVersion }} + + - name: Build + env: + CCACHE_BASEDIR: ${{ runner.workspace }} + CCACHE_DIR: ${{ runner.workspace }}/.ccache + CCACHE_MAXSIZE: 192M # full build consumes around ~80, ~2x that to be safe + run: | + ccache -z + ninja -C '${{ runner.workspace }}/b/ninja' + ccache -s + + - uses: actions/cache@v4 + with: + path: | + ${{ runner.workspace }}/b/ninja/simc + profiles + tests + generate_profiles_ci.sh + .git + key: ubuntu-${{ matrix.compiler }}-for_run-${{ inputs.cache-sha }}-cpp-${{ matrix.cppVersion }} + + ubuntu-clang-build: + name: ubuntu-build-${{ matrix.compiler }}-C++${{ matrix.cppVersion }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + cppVersion: [17, 20] + compiler: [clang++-15, clang++-18] + include: + - compiler: clang++-15 + os: ubuntu-22.04 + packages: clang-15 lld-15 + enable_file_prefix_map: true + - compiler: clang++-18 + os: ubuntu-24.04 + packages: clang-18 lld-18 + enable_file_prefix_map: true + + steps: + - uses: actions/checkout@v4 + + - uses: actions/cache@v4 + env: + CCACHE_PREFIX: "ubuntu-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-ccache-${{ env.CCACHE_GENERATION }}" + with: + path: ${{ runner.workspace }}/.ccache + key: ${{ env.CCACHE_PREFIX }}-${{ inputs.cache-sha }} + restore-keys: ${{ env.CCACHE_PREFIX }}- + + - name: Install deps + run: | + sudo apt-get update + sudo apt-get install -y libcurl4-openssl-dev ninja-build ccache ${{ matrix.packages }} + + - name: Configure + env: + UBSAN_STRIP_COUNT: '`echo "${{ runner.workspace }}//" | grep -o ''/'' - | wc -l`' + run: + cmake -H. -B'${{ runner.workspace }}/b/ninja' -GNinja -DBUILD_GUI=OFF + -DCMAKE_BUILD_TYPE=Debug + -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} + -DCMAKE_CXX_FLAGS="-Og ${{ matrix.enable_file_prefix_map && format('-ffile-prefix-map={0}/=/', runner.workspace) || ''}} + -fno-omit-frame-pointer -fsanitize=address,undefined + -fsanitize-undefined-strip-path-components=$UBSAN_STRIP_COUNT" + -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld -fsanitize=address,undefined" + -DCMAKE_CXX_STANDARD=${{ matrix.cppVersion }} + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + + - name: Build + env: + CCACHE_BASEDIR: ${{ runner.workspace }} + CCACHE_DIR: ${{ runner.workspace }}/.ccache + CCACHE_MAXSIZE: 256M # full build consumes around ~124, ~2x that to be safe + run: | + ccache -z + ninja -C '${{ runner.workspace }}/b/ninja' + ccache -s + + - uses: actions/cache@v4 + with: + path: | + ${{ runner.workspace }}/b/ninja/simc + profiles + tests + generate_profiles_ci.sh + .git + key: ubuntu-${{ matrix.compiler }}-for_run-${{ inputs.cache-sha }}-cpp-${{ matrix.cppVersion }} + + build-osx: + name: macos-latest + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: Build + run: make SANITIZE=1 -C engine debug -j 2 + + - name: Smoke Test + if: inputs.do-test + run: ./engine/simc $SIMC_PROFILE iterations=5 output=/dev/null html=/dev/null json2=/dev/null cleanup_threads=1 + + windows-VS: + name: windows-VS-${{ matrix.vs }}-${{ matrix.arch }} + runs-on: windows-latest + strategy: + matrix: + vs: [2019] + arch: [x64, amd64_arm64] + include: + - arch: x64 + runSmokeTest: false # disable smoke test for now, as it seems to hang the workflow indefinitely on assert, instead of failing. + + env: + CMAKE_BUILD_DIR: ${{ github.workspace }}/builddir/ + + steps: + - uses: actions/checkout@v4 + + # Setup the build machine with the most recent versions of CMake and Ninja. Both are cached if not already: on subsequent runs both will be quickly restored from GitHub cache service. + - uses: lukka/get-cmake@latest + + # On Windows runners, let's ensure to have the Developer Command Prompt environment setup correctly. As used here the Developer Command Prompt created is targeting x64 and using the default the Windows SDK. + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + + - name: Generate project files + run: | + cmake -B "${{ env.CMAKE_BUILD_DIR }}" -GNinja -DBUILD_GUI=OFF -DCMAKE_BUILD_TYPE=Debug + + - name: Build + run: | + cmake --build "${{ env.CMAKE_BUILD_DIR }}" + + - name: Smoke Test + if: matrix.runSmokeTest && inputs.do-test + run: ${{ env.CMAKE_BUILD_DIR }}/simc.exe $env:SIMC_PROFILE iterations=5 output=nul html=nul json2=nul cleanup_threads=1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 97e3a9bd306..984836bb801 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Test run: - echo "${{github.ref}} ${{github.event.repository.default_branch}} ${{github.ref_name}} ${{github.base_ref}} ${{github.head_ref}}" + echo "${{github.event.repository.default_branch}} ${{github.base_ref}} ${{github.sha}}" build: uses: ./.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: cache-sha: ${{ github.sha }} spec-test: - needs: [ubuntu-clang-build] + needs: [build] if: github.base_ref == github.event.repository.default_branch || github.base_ref == 'midnight' uses: ./.github/workflows/spec_test.yml with: @@ -38,7 +38,7 @@ jobs: is-ptr: false spec-test-ptr: - needs: [spec-test, ubuntu-clang-build] + needs: [spec-test] uses: ./.github/workflows/spec_test.yml with: cache-key: ubuntu-clang++-15-for_run-${{ github.sha }}-cpp-17 @@ -46,14 +46,14 @@ jobs: is-ptr: true ubuntu-run: - needs: [ubuntu-clang-build, ubuntu-gcc-build] + needs: [build] if: github.base_ref == github.event.repository.default_branch || github.base_ref == 'midnight' uses: ./.github/workflows/ubuntu_run.yml with: cache-sha: ${{ github.sha }} update-generated-files: - needs: [spec-test] + needs: [build] if: github.event_name == 'push' && ( success() || failure() ) && github.repository == 'simulationcraft/simc' && github.base_ref == github.event.repository.default_branch uses: ./.github/workflows/generate_files.yml with: From 18d1fb0e1c55a4aa9ede90f9fc7d4694449b6106 Mon Sep 17 00:00:00 2001 From: Kate Martin <51387586+renanthera@users.noreply.github.com> Date: Sat, 3 Jan 2026 16:33:03 -0700 Subject: [PATCH 4/8] [ci] Clean up inputs. --- .github/workflows/build.yml | 22 ++++++---------------- .github/workflows/generate_files.yml | 12 ++++-------- .github/workflows/main.yml | 20 ++++---------------- .github/workflows/spec_test.yml | 5 +---- .github/workflows/ubuntu_run.yml | 6 +----- 5 files changed, 16 insertions(+), 49 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 76dd478f609..8139d362c06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,21 +3,11 @@ name: build on: workflow_call: inputs: - cache-sha: - type: string - required: true do-test: type: boolean required: true jobs: - test-job-2: - runs-on: ubuntu-22.04 - steps: - - name: Test-2 - run: - echo "${{github.event.repository.default_branch}} ${{github.base_ref}} ${{github.sha}}" - ubuntu-gcc-build: name: ubuntu-${{ matrix.compiler }}-cpp${{ matrix.cppVersion }}-build runs-on: ${{ matrix.os }} @@ -43,7 +33,7 @@ jobs: CCACHE_PREFIX: "ubuntu-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-ccache-${{ env.CCACHE_GENERATION }}" with: path: ${{ runner.workspace }}/.ccache - key: ${{ env.CCACHE_PREFIX }}-${{ inputs.cache-sha }} + key: ${{ env.CCACHE_PREFIX }}-${{ github.sha }} restore-keys: ${{ env.CCACHE_PREFIX }}- - name: Install deps @@ -77,7 +67,7 @@ jobs: tests generate_profiles_ci.sh .git - key: ubuntu-${{ matrix.compiler }}-for_run-${{ inputs.cache-sha }}-cpp-${{ matrix.cppVersion }} + key: ubuntu-${{ matrix.compiler }}-for_run-${{ github.sha }}-cpp-${{ matrix.cppVersion }} ubuntu-clang-build: name: ubuntu-build-${{ matrix.compiler }}-C++${{ matrix.cppVersion }} @@ -104,7 +94,7 @@ jobs: CCACHE_PREFIX: "ubuntu-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-ccache-${{ env.CCACHE_GENERATION }}" with: path: ${{ runner.workspace }}/.ccache - key: ${{ env.CCACHE_PREFIX }}-${{ inputs.cache-sha }} + key: ${{ env.CCACHE_PREFIX }}-${{ github.sha }} restore-keys: ${{ env.CCACHE_PREFIX }}- - name: Install deps @@ -144,7 +134,7 @@ jobs: tests generate_profiles_ci.sh .git - key: ubuntu-${{ matrix.compiler }}-for_run-${{ inputs.cache-sha }}-cpp-${{ matrix.cppVersion }} + key: ubuntu-${{ matrix.compiler }}-for_run-${{ github.sha }}-cpp-${{ matrix.cppVersion }} build-osx: name: macos-latest @@ -156,7 +146,7 @@ jobs: run: make SANITIZE=1 -C engine debug -j 2 - name: Smoke Test - if: inputs.do-test + if: inputs.do-test == 'true' run: ./engine/simc $SIMC_PROFILE iterations=5 output=/dev/null html=/dev/null json2=/dev/null cleanup_threads=1 windows-VS: @@ -193,5 +183,5 @@ jobs: cmake --build "${{ env.CMAKE_BUILD_DIR }}" - name: Smoke Test - if: matrix.runSmokeTest && inputs.do-test + if: matrix.runSmokeTest && inputs.do-test == 'true' run: ${{ env.CMAKE_BUILD_DIR }}/simc.exe $env:SIMC_PROFILE iterations=5 output=nul html=nul json2=nul cleanup_threads=1 diff --git a/.github/workflows/generate_files.yml b/.github/workflows/generate_files.yml index 33c560e6d1e..14fbf566390 100644 --- a/.github/workflows/generate_files.yml +++ b/.github/workflows/generate_files.yml @@ -2,10 +2,6 @@ name: generate-files on: workflow_call: - inputs: - cache-sha: - type: string - required: true jobs: update-generated-files: @@ -21,12 +17,12 @@ jobs: tests generate_profiles_ci.sh .git - key: ubuntu-clang++-15-for_run-${{ inputs.cache-sha }}-cpp-17 + key: ubuntu-clang++-15-for_run-${{ github.sha }}-cpp-17 - uses: actions/checkout@v4 - name: Setup - run: echo "SHORT_SHA=$(git rev-parse --short ${{ inputs.cache-sha }})" >> $GITHUB_ENV + run: echo "SHORT_SHA=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV - name: Generate APL Modules if: steps.cache.outputs.cache-hit == 'true' @@ -38,7 +34,7 @@ jobs: uses: actions/download-artifact@v4 with: path: ActionPriorityLists - pattern: apl-${{ inputs.cache-sha }}-* + pattern: apl-${{ github.sha }}-* merge-multiple: true - name: Generate Profiles @@ -75,4 +71,4 @@ jobs: - name: Cleanup APL Dumps uses: geekyeggo/delete-artifact@v5 with: - name: apl-${{ inputs.cache-sha }}-* + name: apl-${{ github.sha }}-* diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 984836bb801..b2f7eb14886 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,17 +16,10 @@ env: CCACHE_GENERATION: 0 # bump if you need to "clean" ccache jobs: - test-job: - runs-on: ubuntu-22.04 - steps: - - name: Test - run: - echo "${{github.event.repository.default_branch}} ${{github.base_ref}} ${{github.sha}}" - build: uses: ./.github/workflows/build.yml with: - cache-sha: ${{ github.sha }} + do-test: ${{ github.base_ref == github.event.repository.default_branchy || github.base_ref == 'midnight' }} spec-test: needs: [build] @@ -34,28 +27,23 @@ jobs: uses: ./.github/workflows/spec_test.yml with: cache-key: ubuntu-clang++-15-for_run-${{ github.sha }}-cpp-17 - cache-sha: ${{ github.sha }} is-ptr: false spec-test-ptr: - needs: [spec-test] + needs: [build] + if: github.base_ref == github.event.repository.default_branch || github.base_ref == 'midnight' uses: ./.github/workflows/spec_test.yml with: cache-key: ubuntu-clang++-15-for_run-${{ github.sha }}-cpp-17 - cache-sha: ${{ github.sha }} is-ptr: true ubuntu-run: needs: [build] if: github.base_ref == github.event.repository.default_branch || github.base_ref == 'midnight' uses: ./.github/workflows/ubuntu_run.yml - with: - cache-sha: ${{ github.sha }} + # this job will do bad things if enabled for non-default branch without additional work update-generated-files: needs: [build] if: github.event_name == 'push' && ( success() || failure() ) && github.repository == 'simulationcraft/simc' && github.base_ref == github.event.repository.default_branch uses: ./.github/workflows/generate_files.yml - with: - cache-sha: ${{ github.sha }} - do-test: github.base_ref == github.event.repository.default_branchy || github.base_ref == 'midnight' diff --git a/.github/workflows/spec_test.yml b/.github/workflows/spec_test.yml index 771906d2acc..190831e3ab0 100644 --- a/.github/workflows/spec_test.yml +++ b/.github/workflows/spec_test.yml @@ -6,9 +6,6 @@ on: cache-key: type: string required: true - cache-sha: - type: string - required: true is-ptr: type: boolean required: true @@ -246,7 +243,7 @@ jobs: continue-on-error: true uses: actions/upload-artifact@v4 with: - name: apl-${{ inputs.cache-sha }}-${{ matrix.spec }} + name: apl-${{ github.sha }}-${{ matrix.spec }} path: | default/${{ matrix.spec }}.simc assisted_combat/${{ matrix.spec }}.simc diff --git a/.github/workflows/ubuntu_run.yml b/.github/workflows/ubuntu_run.yml index b87080b0320..94442e088e6 100644 --- a/.github/workflows/ubuntu_run.yml +++ b/.github/workflows/ubuntu_run.yml @@ -2,10 +2,6 @@ name: ubuntu-run on: workflow_call: - inputs: - cache-sha: - type: string - required: true env: SIMC_PROFILE: profiles/CI.simc @@ -16,7 +12,7 @@ jobs: name: ubuntu-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-${{ matrix.type }} runs-on: ${{ matrix.os }} env: - CACHE_KEY: ubuntu-${{ matrix.compiler }}-for_run-${{ inputs.cache-sha }}-cpp-${{ matrix.cppVersion }} + CACHE_KEY: ubuntu-${{ matrix.compiler }}-for_run-${{ github.sha }}-cpp-${{ matrix.cppVersion }} UBSAN_OPTIONS: print_stacktrace=1 strategy: From b283588d3bc61f97138ec34fc48d91051a3de378 Mon Sep 17 00:00:00 2001 From: Kate Martin <51387586+renanthera@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:49:25 -0700 Subject: [PATCH 5/8] [ci] Disable PTR CI for midnight branch. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b2f7eb14886..88cdb9beb15 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: spec-test-ptr: needs: [build] - if: github.base_ref == github.event.repository.default_branch || github.base_ref == 'midnight' + if: github.base_ref == github.event.repository.default_branch uses: ./.github/workflows/spec_test.yml with: cache-key: ubuntu-clang++-15-for_run-${{ github.sha }}-cpp-17 From e6a9b1a48638bdc2d9511e76297d75bf503d38c6 Mon Sep 17 00:00:00 2001 From: Kate Martin <51387586+renanthera@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:59:07 -0700 Subject: [PATCH 6/8] [ci] Rename `ubuntu-run` to `ubuntu-test`. Correct needs for `update-generated-files`. --- .github/workflows/main.yml | 4 ++-- .github/workflows/{ubuntu_run.yml => ubuntu_test.yml} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{ubuntu_run.yml => ubuntu_test.yml} (99%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88cdb9beb15..826053d910b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,13 +37,13 @@ jobs: cache-key: ubuntu-clang++-15-for_run-${{ github.sha }}-cpp-17 is-ptr: true - ubuntu-run: + ubuntu-test: needs: [build] if: github.base_ref == github.event.repository.default_branch || github.base_ref == 'midnight' uses: ./.github/workflows/ubuntu_run.yml # this job will do bad things if enabled for non-default branch without additional work update-generated-files: - needs: [build] + needs: [build, spec-test] if: github.event_name == 'push' && ( success() || failure() ) && github.repository == 'simulationcraft/simc' && github.base_ref == github.event.repository.default_branch uses: ./.github/workflows/generate_files.yml diff --git a/.github/workflows/ubuntu_run.yml b/.github/workflows/ubuntu_test.yml similarity index 99% rename from .github/workflows/ubuntu_run.yml rename to .github/workflows/ubuntu_test.yml index 94442e088e6..dd063a887c3 100644 --- a/.github/workflows/ubuntu_run.yml +++ b/.github/workflows/ubuntu_test.yml @@ -1,4 +1,4 @@ -name: ubuntu-run +name: ubuntu-test on: workflow_call: From 37d71344b280945116e940d2004cac30397cb92f Mon Sep 17 00:00:00 2001 From: Kate Martin <51387586+renanthera@users.noreply.github.com> Date: Sat, 3 Jan 2026 19:00:43 -0700 Subject: [PATCH 7/8] [ci] Rename completely. --- .github/workflows/ubuntu_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_test.yml b/.github/workflows/ubuntu_test.yml index dd063a887c3..99c17129858 100644 --- a/.github/workflows/ubuntu_test.yml +++ b/.github/workflows/ubuntu_test.yml @@ -8,7 +8,7 @@ env: SIMC_ARGS: output=/dev/null html=/dev/null json=/dev/null jobs: - ubuntu-run: + ubuntu-test: name: ubuntu-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-${{ matrix.type }} runs-on: ${{ matrix.os }} env: From b5e8674355b3c8c8f7cb910127671d0ffc4c30f0 Mon Sep 17 00:00:00 2001 From: Kate Martin <51387586+renanthera@users.noreply.github.com> Date: Sat, 3 Jan 2026 19:01:37 -0700 Subject: [PATCH 8/8] [ci] Rename completely. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 826053d910b..9ec667050f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,7 @@ jobs: ubuntu-test: needs: [build] if: github.base_ref == github.event.repository.default_branch || github.base_ref == 'midnight' - uses: ./.github/workflows/ubuntu_run.yml + uses: ./.github/workflows/ubuntu_test.yml # this job will do bad things if enabled for non-default branch without additional work update-generated-files: