Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use macos-latest #690

Closed
wants to merge 17 commits into from
8 changes: 3 additions & 5 deletions .github/workflows/analyzers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
types:
- completed


jobs:
pvs:
if: github.repository_owner == 'victimsnino' && github.event.workflow_run.conclusion == 'success'
Expand Down Expand Up @@ -39,8 +38,7 @@ jobs:
path: |
~/.conan2
/Users/runner/.conan2/
key: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }}
restore-keys: deps-ci-ubuntu-clang-Release
restore-keys: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }}

- name: conan detect profile
run: |
Expand Down Expand Up @@ -112,8 +110,8 @@ jobs:
path: |
~/.conan2
/Users/runner/.conan2/
key: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }}
restore-keys: deps-ci-ubuntu-clang-Release
restore-keys: |
deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }}

- name: conan detect profile
run: |
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/ci v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
CACHE_INDEX: 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix environment variable reference syntax

The CACHE_INDEX environment variable is incorrectly referenced in the cache key. GitHub Actions requires environment variables to be accessed through the env context.

Apply this change to fix the syntax:

- key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }}-${{CACHE_INDEX}}
+ key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }}-${{ env.CACHE_INDEX }}

Also applies to: 55-55


jobs:
cache_deps:
Expand All @@ -24,7 +26,7 @@ jobs:
config: [{name: ci-ubuntu-gcc, os: ubuntu-latest},
{name: ci-ubuntu-clang, os: ubuntu-latest},
{name: ci-windows, os: windows-latest},
{name: ci-macos, os: macos-12}]
{name: ci-macos, os: macos-latest}]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Based on the output, I can generate the final response as we have sufficient information about the available macOS runners. The script results show that GitHub Actions currently supports macOS versions 12 through 15, including ARM64 variants for versions 13-15.

Specify macOS version 14 instead of using latest

Using macos-latest may lead to unexpected behavior when GitHub automatically updates the runner. Based on the available runners, it's recommended to use macos-14 as it represents a stable, recent version while maintaining predictability in your CI pipeline.

  • Update line 29: Replace macos-latest with macos-14
  • Update line 142: Replace macos-latest with macos-14
🔗 Analysis chain

Consider using a specific macOS version instead of latest

While macos-latest automatically provides the most recent stable runner, it may introduce unexpected behavior when GitHub updates the runner version. Consider using a specific version (e.g., macos-13) for better stability and predictability.

Run this script to check the current macOS version and available options:

Also applies to: 142-142

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check current macOS runner version and available options

# Get current macos-latest version
gh api \
  -H "Accept: application/vnd.github+json" \
  /repos/actions/runner-images/contents/images/macos/macos-latest.json | jq -r '.content' | base64 -d | jq '.os_version'

# List available macOS runner versions
gh api \
  -H "Accept: application/vnd.github+json" \
  /repos/actions/runner-images/contents/images/macos | jq -r '.[].name' | grep macos

Length of output: 570

build_type: [{config: Release}, {config: Debug}]

timeout-minutes: 120
Expand All @@ -50,8 +52,7 @@ jobs:
path: |
~/.conan2
/Users/runner/.conan2/
key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }}
restore-keys: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}
key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }}-${{CACHE_INDEX}}
lookup-only: true

- name: Install Qt
Expand Down Expand Up @@ -110,8 +111,7 @@ jobs:
path: |
~/.conan2
/Users/runner/.conan2/
key: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }}
restore-keys: deps-ci-ubuntu-clang-Release
restore-keys: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }}

- name: conan detect profile
run: |
Expand All @@ -137,7 +137,7 @@ jobs:
config: [{name: ci-ubuntu-gcc, os: ubuntu-latest},
{name: ci-ubuntu-clang, os: ubuntu-latest},
{name: ci-windows, os: windows-latest},
{name: ci-macos, os: macos-12}]
{name: ci-macos, os: macos-latest}]
type: [tests, benchmarks]
build_type: [{config: Release, test_preset: ci-tests}, {config: Debug, test_preset: ci-tests-debug}]
optimization_disabled: [{mode: 0, postfix: ""}, {mode: 1, postfix: " (Optimizations disabled)"}]
Expand Down Expand Up @@ -188,8 +188,7 @@ jobs:
path: |
~/.conan2
/Users/runner/.conan2/
key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }}
restore-keys: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}
restore-keys: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('**/conanfile.py') }}-${{ hashFiles('**/CMakePresets.json') }}

- name: conan detect profile
run: |
Expand Down