Skip to content

Commit 9d04f07

Browse files
Run CI on self-hosted runners (#8)
Mirror QuantConnect/Lean#9540 (commit c57fd18b): run the build/test workflow on self-hosted runners directly inside a job-level quantconnect/lean:foundation container (--cpus 12 --memory 12g) instead of the GitHub-hosted ubuntu runner + addnab/docker-run wrapper. Drops the disk-cleanup step and the docker-run wrapper (build/test now run as a normal step inside the container; secrets via container env), and adds a concurrency group (cancel-in-progress). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 62cd26d commit 9d04f07

1 file changed

Lines changed: 15 additions & 20 deletions

File tree

.github/workflows/gh-actions.yml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,20 @@ on:
44
push:
55
branches: ['*']
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
build:
9-
runs-on: ubuntu-24.04
13+
runs-on: self-hosted
14+
container:
15+
image: quantconnect/lean:foundation
16+
options: --cpus 12 --memory 12g
1017
steps:
1118
- name: Checkout
1219
uses: actions/checkout@v2
1320

14-
- name: Liberate disk space
15-
uses: jlumbroso/free-disk-space@main
16-
with:
17-
tool-cache: true
18-
large-packages: false
19-
docker-images: false
20-
swap-storage: false
21-
2221
- name: Checkout Lean Same Branch
2322
id: lean-same-branch
2423
uses: actions/checkout@v2
@@ -38,14 +37,10 @@ jobs:
3837
- name: Move Lean
3938
run: mv Lean ../Lean
4039

41-
- name: Run Image
42-
uses: addnab/docker-run-action@v3
43-
with:
44-
image: quantconnect/lean:foundation
45-
options: -v /home/runner/work:/__w --workdir /__w/Lean.DataSource.FactSet/Lean.DataSource.FactSet
46-
shell: bash
47-
run: |
48-
# Build
49-
dotnet build /p:Configuration=Release /v:quiet /p:WarningLevel=1 QuantConnect.DataSource.FactSet.sln
50-
# Run Tests
51-
dotnet test ./QuantConnect.FactSet.Tests/bin/Release/net9.0/QuantConnect.DataLibrary.Tests.dll
40+
- name: Run build and tests
41+
run: |
42+
# Build
43+
dotnet build /p:Configuration=Release /v:quiet /p:WarningLevel=1 QuantConnect.DataSource.FactSet.sln
44+
# Run Tests
45+
dotnet test ./QuantConnect.FactSet.Tests/bin/Release/net9.0/QuantConnect.DataLibrary.Tests.dll
46+

0 commit comments

Comments
 (0)