Skip to content

Commit

Permalink
[CI] Don't use runner.name as a key for ubuntu's ccache (#1878)
Browse files Browse the repository at this point in the history
`${{runner.name}}` refers to

> The name of the runner executing the job. This name may not be unique
in a workflow run as runners at the repository and organization levels
could use the same name.


[source](https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context)

It may be too unique since after this change, ccache never finds cached
data (hit rate ~ 0%). This defeats the purpose of using a cache.

Using a fixed value may lead to a higher hit rate.
  • Loading branch information
flomnes authored Jan 15, 2024
1 parent a7b9cd7 commit 6f61def
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
name: Build
env:
ORTOOLS_DIR: ${{ github.workspace }}/or-tools
OS: ubuntu-20.04
os: ubuntu-20.04

runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[skip ci]')"
Expand All @@ -41,7 +41,7 @@ jobs:
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ runner.name }}
key: ${{ env.os }}

- name: Install libraries
run: |
Expand All @@ -66,7 +66,7 @@ jobs:
uses: ./.github/workflows/download-extract-precompiled-libraries-tgz
with:
antares-deps-version: ${{steps.antares-deps-version.outputs.prop}}
os: ${{env.OS}}
os: ${{env.os}}
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}

Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-named-mps
os: ${{ env.OS }}
os: ${{ env.os }}
variant: "named-mps"

- name: Run unfeasibility-related tests
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-v830
os: ${{ env.OS }}
os: ${{ env.os }}

- name: Run MILP with CBC
if: ${{ env.RUN_SIMPLE_TESTS == 'true' }}
Expand All @@ -158,55 +158,55 @@ jobs:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-milp
variant: "milp-cbc"
os: ${{ env.OS }}
os: ${{ env.os }}

- name: Run tests introduced in v860
if: ${{ env.RUN_SIMPLE_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-v860
os: ${{ env.OS }}
os: ${{ env.os }}

- name: Run tests introduced in v870
if: ${{ env.RUN_SIMPLE_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-v870
os: ${{ env.OS }}
os: ${{ env.os }}

- name: Run short-tests
if: ${{ env.RUN_SIMPLE_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: short-tests
os: ${{ env.OS }}
os: ${{ env.os }}

- name: Run mps tests
if: ${{ env.RUN_SIMPLE_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-mps
os: ${{ env.OS }}
os: ${{ env.os }}

- name: Run tests for adequacy patch (CSR)
if: ${{ env.RUN_SIMPLE_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: adequacy-patch-CSR
os: ${{ env.OS }}
os: ${{ env.os }}

- name: Run parallel tests
if: ${{ env.RUN_EXTENDED_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-parallel
os: ${{ env.OS }}
os: ${{ env.os }}
variant: "parallel"

- name: Run medium-tests
Expand All @@ -215,31 +215,31 @@ jobs:
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: medium-tests
os: ${{ env.OS }}
os: ${{ env.os }}

- name: Run long-tests-1
if: ${{ env.RUN_EXTENDED_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: long-tests-1
os: ${{ env.OS }}
os: ${{ env.os }}

- name: Run long-tests-2
if: ${{ env.RUN_EXTENDED_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: long-tests-2
os: ${{ env.OS }}
os: ${{ env.os }}

- name: Run long-tests-3
if: ${{ env.RUN_EXTENDED_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: long-tests-3
os: ${{ env.OS }}
os: ${{ env.os }}

- name: Installer .deb creation
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
ORTOOLS_DIR: ${{ github.workspace }}/or-tools
RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule'}}
OS: windows-latest
os: windows-latest
test-platform: windows-2022
vcpkgPackages: wxwidgets boost-test
triplet: x64-windows
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
uses: ./.github/workflows/download-extract-precompiled-libraries-zip
with:
antares-deps-version: ${{steps.antares-deps-version.outputs.prop}}
os: ${{env.OS}}
os: ${{env.os}}
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}

Expand Down

0 comments on commit 6f61def

Please sign in to comment.