diff --git a/.github/workflows/black.yaml b/.github/workflows/black.yaml index d14d043183..117bbab072 100644 --- a/.github/workflows/black.yaml +++ b/.github/workflows/black.yaml @@ -1,11 +1,9 @@ name: Lint Python on: [push, pull_request] - jobs: lint: - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} steps: - uses: actions/checkout@v3 - uses: psf/black@stable - diff --git a/.github/workflows/github-actions-cron-sync-fork-from-upstream.yml b/.github/workflows/github-actions-cron-sync-fork-from-upstream.yml index 6d5f57424c..e91e0633cc 100644 --- a/.github/workflows/github-actions-cron-sync-fork-from-upstream.yml +++ b/.github/workflows/github-actions-cron-sync-fork-from-upstream.yml @@ -14,7 +14,7 @@ on: jobs: Sync-Branch-From-Upstream: name: Automatic sync 'master' from The-OpenROAD-Project/OpenROAD-flow-scripts - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} # Only allow one action to run at a time. concurrency: sync-branch-from-upstream diff --git a/.github/workflows/github-actions-cron-test-installer.yml b/.github/workflows/github-actions-cron-test-installer.yml index b2564f5db2..2a53fde91a 100644 --- a/.github/workflows/github-actions-cron-test-installer.yml +++ b/.github/workflows/github-actions-cron-test-installer.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu20.04", "ubuntu22.04"] - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} steps: - name: Check out repository code uses: actions/checkout@v3 diff --git a/.github/workflows/github-actions-cron-update-OR.yml b/.github/workflows/github-actions-cron-update-OR.yml index 6511c5563c..695bd621f0 100644 --- a/.github/workflows/github-actions-cron-update-OR.yml +++ b/.github/workflows/github-actions-cron-update-OR.yml @@ -7,7 +7,7 @@ on: jobs: update: - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} steps: - name: Check out repository code recursively uses: actions/checkout@v3 diff --git a/.github/workflows/github-actions-cron-update-yosys.yml b/.github/workflows/github-actions-cron-update-yosys.yml index b88a39c721..f19a27ebe5 100644 --- a/.github/workflows/github-actions-cron-update-yosys.yml +++ b/.github/workflows/github-actions-cron-update-yosys.yml @@ -8,7 +8,7 @@ on: jobs: update: - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} steps: - name: Check out repository code recursively uses: actions/checkout@v3 diff --git a/.github/workflows/github-actions-cron-util-test.yml b/.github/workflows/github-actions-cron-util-test.yml index b57089329b..dcfda4c78b 100644 --- a/.github/workflows/github-actions-cron-util-test.yml +++ b/.github/workflows/github-actions-cron-util-test.yml @@ -13,11 +13,11 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -jobs: +jobs: testUtilScripts: strategy: fail-fast: false - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} steps: - name: Check out repository code uses: actions/checkout@v3 @@ -33,4 +33,4 @@ jobs: cd flow/test for file in *.py; do python "$file" - done \ No newline at end of file + done diff --git a/.github/workflows/github-actions-manual-update-rules.yml b/.github/workflows/github-actions-manual-update-rules.yml index fc10dae30d..2bc2e02d22 100644 --- a/.github/workflows/github-actions-manual-update-rules.yml +++ b/.github/workflows/github-actions-manual-update-rules.yml @@ -9,7 +9,7 @@ on: jobs: update: - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} strategy: fail-fast: false steps: @@ -30,7 +30,7 @@ jobs: run: | if [[ "${{ github.event.inputs.type }}" == "overwrite" ]]; then python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --commitSHA $(git rev-parse HEAD) --overwrite - else + else python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --commitSHA $(git rev-parse HEAD) fi - name: Push updated rules diff --git a/.github/workflows/github-actions-on-delete-cleanup.yml b/.github/workflows/github-actions-on-delete-cleanup.yml index 7596854aad..5dc97769ad 100644 --- a/.github/workflows/github-actions-on-delete-cleanup.yml +++ b/.github/workflows/github-actions-on-delete-cleanup.yml @@ -12,7 +12,7 @@ jobs: Delete-From-Staging: name: Delete branch from staging - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} permissions: # Read-only access so we don't accidentally try to push to *this* repository. diff --git a/.github/workflows/github-actions-on-label-create.yml b/.github/workflows/github-actions-on-label-create.yml index 0befd29908..4e083dac8a 100644 --- a/.github/workflows/github-actions-on-label-create.yml +++ b/.github/workflows/github-actions-on-label-create.yml @@ -12,7 +12,7 @@ env: jobs: Push-To-Staging: name: Push to staging - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} permissions: # Read-only access so we don't accidentally try to push to *this* repository. diff --git a/.github/workflows/github-actions-on-push.yml b/.github/workflows/github-actions-on-push.yml index d95abd04bc..579beea403 100644 --- a/.github/workflows/github-actions-on-push.yml +++ b/.github/workflows/github-actions-on-push.yml @@ -8,12 +8,9 @@ on: jobs: scan: - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} steps: - name: Check out repository code uses: actions/checkout@v2 - name: run security_scan_on_push uses: The-OpenROAD-Project/actions/security_scan_on_push@main - - - diff --git a/.github/workflows/github-actions-publish-docker-images.yml b/.github/workflows/github-actions-publish-docker-images.yml index bf32946e50..476ec3220d 100644 --- a/.github/workflows/github-actions-publish-docker-images.yml +++ b/.github/workflows/github-actions-publish-docker-images.yml @@ -27,7 +27,7 @@ on: jobs: buildCodespaceImage: - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} timeout-minutes: 600 steps: - uses: actions/checkout@v4 @@ -61,7 +61,7 @@ jobs: fail-fast: false matrix: os: [["ubuntu20.04", "ubuntu:20.04"], ["ubuntu22.04", "ubuntu:22.04"]] - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} steps: - name: Check out repository code uses: actions/checkout@v4 diff --git a/.github/workflows/github-actions-update-rules.yml b/.github/workflows/github-actions-update-rules.yml index c728f90df9..83e4b4208b 100644 --- a/.github/workflows/github-actions-update-rules.yml +++ b/.github/workflows/github-actions-update-rules.yml @@ -6,7 +6,7 @@ on: jobs: update: - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} strategy: fail-fast: false steps: diff --git a/.github/workflows/github-actions-yaml-test.yml b/.github/workflows/github-actions-yaml-test.yml index e9ced92258..51cec64329 100644 --- a/.github/workflows/github-actions-yaml-test.yml +++ b/.github/workflows/github-actions-yaml-test.yml @@ -7,7 +7,7 @@ jobs: docs-test-job: name: 'Tests for variables.yaml' if: github.event_name == 'pull_request' || github.event_name == 'push' - runs-on: ubuntu-latest + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} steps: - name: Checkout repository uses: actions/checkout@v4