Skip to content

Commit

Permalink
Consolidate nightly workloads. (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
isarkis authored and andrewsavage1 committed Nov 2, 2022
1 parent ba536bb commit 70b591a
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 145 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ on:
branches: [ main ]
push:
branches: [ main ]
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
inputs:
nightly:
description: 'Nightly workflow.'
required: true
type: boolean
default: false

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
Expand All @@ -19,15 +27,18 @@ jobs:
packages: write
with:
platform: android-arm64
nightly: ${{ github.event.inputs.nightly }}
android-x86:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
with:
platform: android-x86
nightly: ${{ github.event.inputs.nightly }}
android-arm:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
with:
platform: android-arm
nightly: ${{ github.event.inputs.nightly }}
30 changes: 0 additions & 30 deletions .github/workflows/android_nightly.yaml

This file was deleted.

13 changes: 12 additions & 1 deletion .github/workflows/evergreen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ on:
branches: [ main ]
push:
branches: [ main ]
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
inputs:
nightly:
description: 'Nightly workflow.'
required: true
type: boolean
default: false

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
Expand All @@ -19,22 +27,25 @@ jobs:
packages: write
with:
platform: evergreen-x64
nightly: ${{ github.event.inputs.nightly }}
evergreen-arm-hardfp:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
with:
platform: evergreen-arm-hardfp
nightly: ${{ github.event.inputs.nightly }}
evergreen-arm-softfp:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
with:
platform: evergreen-arm-softfp
nightly: ${{ github.event.inputs.nightly }}
evergreen-x86:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
with:
platform: evergreen-x86

nightly: ${{ github.event.inputs.nightly }}
37 changes: 0 additions & 37 deletions .github/workflows/evergreen_nightly.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ on:
branches: [ main ]
push:
branches: [ main ]
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
inputs:
nightly:
description: 'Nightly workflow.'
required: true
type: boolean
default: false

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
Expand All @@ -19,15 +27,18 @@ jobs:
packages: write
with:
platform: linux
nightly: ${{ github.event.inputs.nightly }}
linux-clang-3-9:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
with:
platform: linux-clang-3-9
nightly: ${{ github.event.inputs.nightly }}
linux-gcc-6-3:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
with:
platform: linux-gcc-6-3
nightly: ${{ github.event.inputs.nightly }}
30 changes: 0 additions & 30 deletions .github/workflows/linux_nightly.yaml

This file was deleted.

7 changes: 6 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
description: 'Cobalt platform.'
required: true
type: string
nightly:
description: 'Nightly workflow.'
required: true
type: string
default: 'false'

#Global env vars.
env:
Expand Down Expand Up @@ -151,7 +156,7 @@ jobs:
- name: Build Cobalt
uses: ./.github/actions/build
- name: Upload Nightly Artifacts
if: ${{ contains(github.workflow, '_nightly') && matrix.config != 'debug' }}
if: ${{ ( inputs.nightly == 'true' || github.event_name == 'schedule' ) && matrix.config != 'debug' }}
uses: ./.github/actions/upload_nightly_artifacts
- name: Upload On Host Test Artifacts
if: ${{ matrix.config == 'devel' && needs.initialize.outputs.on_host_test == 'true' }}
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/nightly_trigger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: nightly_trigger

on:
schedule:
- cron: '0 21 * * *'
workflow_dispatch:

jobs:
trigger_23:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
ref: 23.lts.1+
- name: Trigger Nightly
run: |
set -x
gh workflow run android_23.lts.1+ --ref 23.lts.1+ -f nightly=true
gh workflow run evergreen_23.lts.1+ --ref 23.lts.1+ -f nightly=true
gh workflow run linux_23.lts.1+ --ref 23.lts.1+ -f nightly=true
gh workflow run raspi-2_23.lts.1+ --ref 23.lts.1+ -f nightly=true
gh workflow run win32_23.lts.1+ --ref 23.lts.1+ -f nightly=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
trigger_22:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
ref: 22.lts.1+
- name: Trigger Nightly
run: |
set -x
gh workflow run android_22.lts.1+ --ref 22.lts.1+ -f nightly=true
gh workflow run evergreen_22.lts.1+ --ref 22.lts.1+ -f nightly=true
gh workflow run linux_22.lts.1+ --ref 22.lts.1+ -f nightly=true
gh workflow run raspi-2_22.lts.1+ --ref 22.lts.1+ -f nightly=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 0 additions & 27 deletions .github/workflows/nightly_trigger_23.lts.1+.yaml

This file was deleted.

10 changes: 9 additions & 1 deletion .github/workflows/raspi-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ on:
branches: [ main ]
push:
branches: [ main ]
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
inputs:
nightly:
description: 'Nightly workflow.'
required: true
type: boolean
default: false

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
Expand All @@ -19,4 +27,4 @@ jobs:
packages: write
with:
platform: raspi-2

nightly: ${{ github.event.inputs.nightly }}
18 changes: 0 additions & 18 deletions .github/workflows/raspi-2_nightly.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/stub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
push:
branches: [ main ]
workflow_dispatch:
inputs:
nightly:
description: 'Nightly workflow.'
required: true
type: boolean
default: false

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
Expand All @@ -19,3 +25,4 @@ jobs:
packages: write
with:
platform: stub
nightly: 'false'

0 comments on commit 70b591a

Please sign in to comment.