Skip to content

Commit

Permalink
CI: Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
gus33000 committed Aug 12, 2024
1 parent 8baec0d commit eabf9c7
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 265 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/all_platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,22 @@ jobs:
run: |
echo "value=[$(find ./Platforms -maxdepth 3 -wholename "*/Device/*" -printf "\"%f\", ")]" >> $GITHUB_OUTPUT
- run: |
echo "${{ steps.matrix.outputs.value }}"
build:
uses: woa-msmnile/msmnilePkg/.github/workflows/build.yml@main
with:
target: ${{fromJSON(needs.setup.outputs.matrix)}}
secrets: inherit
strategy:
matrix:
target: ${{fromJSON(needs.setup.outputs.matrix)}}

# The type of runner that the job will run on
runs-on: ubuntu-latest

needs: setup

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: woa-msmnile/msmnilePkg/.github/workflows/build_device.yml@main
with:
target: ${{ matrix.target }}

package:
strategy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains one job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/build_platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This is a basic workflow to help you get started with Actions

name: Build UEFI for a given platform

on:
workflow_call:
inputs:
platform:
required: true
type: string

# Indicate that we are running in CI
env:
WM_CI_BUILD: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains two jobs called "setup" and "build"
setup:
# The type of runner that the job will run on
runs-on: ubuntu-latest

outputs:
matrix: ${{ steps.matrix.outputs.value }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- id: matrix
run: |
echo "value=[$(find ./Platforms/${{ inputs.platform }} -maxdepth 2 -wholename "*/Device/*" -printf "\"%f\", ")]" >> $GITHUB_OUTPUT
build:
strategy:
matrix:
target: ${{fromJSON(needs.setup.outputs.matrix)}}

# The type of runner that the job will run on
runs-on: ubuntu-latest

needs: setup

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: woa-msmnile/msmnilePkg/.github/workflows/build_device.yml@main
with:
target: ${{ matrix.target }}
48 changes: 5 additions & 43 deletions .github/workflows/sm7125.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,12 @@ env:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains three jobs called "setup" "build" and "package"
setup:
# The type of runner that the job will run on
runs-on: ubuntu-latest

outputs:
matrix: ${{ steps.matrix.outputs.value }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- id: matrix
run: |
echo "value=[$(find ./Platforms/AtollPkg -maxdepth 2 -wholename "*/Device/*" -printf "\"%f\", ")]" >> $GITHUB_OUTPUT
- run: |
echo "${{ steps.matrix.outputs.value }}"
# This workflow contains two jobs called "build" and "package"
build:
strategy:
matrix:
target: ${{fromJSON(needs.setup.outputs.matrix)}}

# The type of runner that the job will run on
runs-on: ubuntu-latest

needs: setup

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Build SecureBoot and No SecureBoot UEFI for ${{ matrix.target }}
run: bash scripts/ci_setup.sh && ./build_uefi.py -d ${{ matrix.target }}

- name: Upload ${{ matrix.target }}'s Artifact
uses: actions/upload-artifact@v4
with:
name: uefi-images-${{ matrix.target }}
path: Build/*/ci_artifacts
compression-level: 9
uses: woa-msmnile/msmnilePkg/.github/workflows/build_platform.yml@main
with:
platform: AtollPkg
secrets: inherit

package:
strategy:
Expand Down
48 changes: 5 additions & 43 deletions .github/workflows/sm7325.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,12 @@ env:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains three jobs called "setup" "build" and "package"
setup:
# The type of runner that the job will run on
runs-on: ubuntu-latest

outputs:
matrix: ${{ steps.matrix.outputs.value }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- id: matrix
run: |
echo "value=[$(find ./Platforms/KodiakPkg -maxdepth 2 -wholename "*/Device/*" -printf "\"%f\", ")]" >> $GITHUB_OUTPUT
- run: |
echo "${{ steps.matrix.outputs.value }}"
# This workflow contains two jobs called "build" and "package"
build:
strategy:
matrix:
target: ${{fromJSON(needs.setup.outputs.matrix)}}

# The type of runner that the job will run on
runs-on: ubuntu-latest

needs: setup

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Build SecureBoot and No SecureBoot UEFI for ${{ matrix.target }}
run: bash scripts/ci_setup.sh && ./build_uefi.py -d ${{ matrix.target }}

- name: Upload ${{ matrix.target }}'s Artifact
uses: actions/upload-artifact@v4
with:
name: uefi-images-${{ matrix.target }}
path: Build/*/ci_artifacts
compression-level: 9
uses: woa-msmnile/msmnilePkg/.github/workflows/build_platform.yml@main
with:
platform: KodiakPkg
secrets: inherit

package:
strategy:
Expand Down
48 changes: 5 additions & 43 deletions .github/workflows/sm8150.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,12 @@ env:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains three jobs called "setup" "build" and "package"
setup:
# The type of runner that the job will run on
runs-on: ubuntu-latest

outputs:
matrix: ${{ steps.matrix.outputs.value }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- id: matrix
run: |
echo "value=[$(find ./Platforms/SurfaceDuo1Pkg -maxdepth 2 -wholename "*/Device/*" -printf "\"%f\", ")]" >> $GITHUB_OUTPUT
- run: |
echo "${{ steps.matrix.outputs.value }}"
# This workflow contains two jobs called "build" and "package"
build:
strategy:
matrix:
target: ${{fromJSON(needs.setup.outputs.matrix)}}

# The type of runner that the job will run on
runs-on: ubuntu-latest

needs: setup

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Build SecureBoot and No SecureBoot UEFI for ${{ matrix.target }}
run: bash scripts/ci_setup.sh && ./build_uefi.py -d ${{ matrix.target }}

- name: Upload ${{ matrix.target }}'s Artifact
uses: actions/upload-artifact@v4
with:
name: uefi-images-${{ matrix.target }}
path: Build/*/ci_artifacts
compression-level: 9
uses: woa-msmnile/msmnilePkg/.github/workflows/build_platform.yml@main
with:
platform: SurfaceDuo1Pkg
secrets: inherit

package:
strategy:
Expand Down
48 changes: 5 additions & 43 deletions .github/workflows/sm8250.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,12 @@ env:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains three jobs called "setup" "build" and "package"
setup:
# The type of runner that the job will run on
runs-on: ubuntu-latest

outputs:
matrix: ${{ steps.matrix.outputs.value }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- id: matrix
run: |
echo "value=[$(find ./Platforms/KonaPkg -maxdepth 2 -wholename "*/Device/*" -printf "\"%f\", ")]" >> $GITHUB_OUTPUT
- run: |
echo "${{ steps.matrix.outputs.value }}"
# This workflow contains two jobs called "build" and "package"
build:
strategy:
matrix:
target: ${{fromJSON(needs.setup.outputs.matrix)}}

# The type of runner that the job will run on
runs-on: ubuntu-latest

needs: setup

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Build SecureBoot and No SecureBoot UEFI for ${{ matrix.target }}
run: bash scripts/ci_setup.sh && ./build_uefi.py -d ${{ matrix.target }}

- name: Upload ${{ matrix.target }}'s Artifact
uses: actions/upload-artifact@v4
with:
name: uefi-images-${{ matrix.target }}
path: Build/*/ci_artifacts
compression-level: 9
uses: woa-msmnile/msmnilePkg/.github/workflows/build_platform.yml@main
with:
platform: KonaPkg
secrets: inherit

package:
strategy:
Expand Down
48 changes: 5 additions & 43 deletions .github/workflows/sm8350.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,12 @@ env:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains three jobs called "setup" "build" and "package"
setup:
# The type of runner that the job will run on
runs-on: ubuntu-latest

outputs:
matrix: ${{ steps.matrix.outputs.value }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- id: matrix
run: |
echo "value=[$(find ./Platforms/SurfaceDuo2Pkg -maxdepth 2 -wholename "*/Device/*" -printf "\"%f\", ")]" >> $GITHUB_OUTPUT
- run: |
echo "${{ steps.matrix.outputs.value }}"
# This workflow contains two jobs called "build" and "package"
build:
strategy:
matrix:
target: ${{fromJSON(needs.setup.outputs.matrix)}}

# The type of runner that the job will run on
runs-on: ubuntu-latest

needs: setup

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Build SecureBoot and No SecureBoot UEFI for ${{ matrix.target }}
run: bash scripts/ci_setup.sh && ./build_uefi.py -d ${{ matrix.target }}

- name: Upload ${{ matrix.target }}'s Artifact
uses: actions/upload-artifact@v4
with:
name: uefi-images-${{ matrix.target }}
path: Build/*/ci_artifacts
compression-level: 9
uses: woa-msmnile/msmnilePkg/.github/workflows/build_platform.yml@main
with:
platform: SurfaceDuo2Pkg
secrets: inherit

package:
strategy:
Expand Down
Loading

0 comments on commit eabf9c7

Please sign in to comment.