Skip to content

Commit b53bbd0

Browse files
Run CI on self-hosted runners
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 3467943 commit b53bbd0

1 file changed

Lines changed: 17 additions & 21 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@ on:
66
pull_request:
77
branches: [master]
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
build:
11-
runs-on: ubuntu-24.04
15+
runs-on: self-hosted
16+
container:
17+
image: quantconnect/lean:foundation
18+
options: --cpus 12 --memory 12g
1219
steps:
1320
- name: Checkout
1421
uses: actions/checkout@v2
1522

16-
- name: Liberate disk space
17-
uses: jlumbroso/free-disk-space@main
18-
with:
19-
tool-cache: true
20-
large-packages: false
21-
docker-images: false
22-
swap-storage: false
23-
2423
- name: Checkout Lean Same Branch
2524
id: lean-same-branch
2625
uses: actions/checkout@v2
@@ -40,15 +39,12 @@ jobs:
4039
- name: Move Lean
4140
run: mv Lean ../Lean
4241

43-
- uses: addnab/docker-run-action@v3
44-
with:
45-
image: quantconnect/lean:foundation
46-
options: --workdir /__w/Lean.DataSource.SDK/Lean.DataSource.SDK -v /home/runner/work:/__w
47-
shell: bash
48-
run: |
49-
# BuildDataSource
50-
dotnet build ./QuantConnect.DataSource.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1 && \
51-
# BuildTests
52-
dotnet build ./tests/Tests.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1 && \
53-
# Run Tests
54-
dotnet test ./tests/bin/Release/net9.0/Tests.dll
42+
- name: Run build and tests
43+
run: |
44+
# BuildDataSource
45+
dotnet build ./QuantConnect.DataSource.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1 && \
46+
# BuildTests
47+
dotnet build ./tests/Tests.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1 && \
48+
# Run Tests
49+
dotnet test ./tests/bin/Release/net9.0/Tests.dll
50+

0 commit comments

Comments
 (0)