Skip to content

CI improvements

CI improvements #890

Workflow file for this run

name: Dasharo
on:
pull_request:
branches:
- dasharo
jobs:
# build_novacustom:
# runs-on: ubuntu-22.04
# container:
# image: coreboot/coreboot-sdk:2021-09-23_b0d87f753c
# options: --user 1001
# strategy:
# matrix:
# vendor: [ novacustom ]
# model: [ nv4x_adl, ns5x_adl, nv4x_tgl, ns5x_tgl ]
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# with:
# # Checkout pull request HEAD commit instead of merge commit
# # See: https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
# ref: ${{ github.event.pull_request.head.sha }}
# # Fetch complete history
# fetch-depth: 0
# - name: Checkout all submodules
# run: git submodule update --init --recursive --checkout
# - name: Build Dasharo
# run: |
# cp configs/config.${{ matrix.vendor }}_${{ matrix.model }} .config
# make olddefconfig
# make
# - name: Save artifacts
# uses: actions/upload-artifact@v2
# with:
# name: "dasharo-${{ matrix.vendor }}-${{ matrix.model }}-${{ matrix.build }}"
# path: |
# build/coreboot.rom
# retention-days: 30
build_msi:
runs-on: ubuntu-22.04
container:
image: coreboot/coreboot-sdk:2021-09-23_b0d87f753c
options: --user 1001
strategy:
matrix:
vendor: [ msi ]
model: [ ms7d25_ddr4, ms7d25_ddr5, ms7e06_ddr4, ms7e06_ddr5 ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# Checkout pull request HEAD commit instead of merge commit
# See: https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
ref: ${{ github.event.pull_request.head.sha }}
# Fetch complete history
fetch-depth: 0
- name: Checkout all submodules
run: git submodule update --init --recursive --checkout
- name: Build Dasharo
run: |
cp configs/config.${{ matrix.vendor }}_${{ matrix.model }} .config
make olddefconfig
make
- name: Save artifacts
uses: actions/upload-artifact@v2
with:
name: "dasharo-${{ matrix.vendor }}-${{ matrix.model }}-${{ matrix.build }}"
path: |
build/coreboot.rom
retention-days: 30
# build_protectli:
# environment: Protectli
# runs-on: ubuntu-22.04
# strategy:
# matrix:
# vendor: [ protectli ]
# model: [ vp46xx ]
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# with:
# # Checkout pull request HEAD commit instead of merge commit
# # See: https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
# ref: ${{ github.event.pull_request.head.sha }}
# # Fetch complete history
# fetch-depth: 0
# - name: Checkout all submodules
# run: git submodule update --init --recursive --checkout
# - name: Obtain Blobs
# shell: bash
# env:
# SSH_KEY: ${{secrets.PROTECTLI_BLOBS_KEY}}
# BLOB_REPO: ${{secrets.PROTECTLI_BLOBS_REPO}}
# run: |
# eval `ssh-agent -s`
# echo "${SSH_KEY}" | ssh-add -
# git clone $BLOB_REPO
# cp -r protectli-blobs/protectli/ 3rdparty/blobs/mainboard/
# - name: Build Dasharo
# run: |
# ./build.sh ${{ matrix.model }}
test_msi:
runs-on: self-hosted
strategy:
matrix:
vendor: [ msi ]
model: [ ms7d25_ddr5 ]
needs: [build_msi]
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Fetch CI script
uses: actions/checkout@v4
with:
sparse-checkout: ci.sh
sparse-checkout-cone-mode: false
- name: Checkout test repository
uses: actions/checkout@v4
with:
repository: Dasharo/open-source-firmware-validation
path: validation
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r validation/requirements.txt
- name: Fetch latest firmware
uses: actions/download-artifact@v3
with:
name: dasharo-${{ matrix.vendor }}-${{ matrix.model }}-${{ matrix.build }}
path: dasharo.rom
- name: Flash firmware
shell: bash
run: ./ci.sh -r validation -v "${{ matrix.vendor }}" -m "${{ matrix.model }}" -f dasharo.rom flash
- name: Run tests
shell: bash
run: ./ci.sh -r validation -v "${{ matrix.vendor }}" -m "${{ matrix.model }}" -f dasharo.rom test
- name: Upload test results
uses: actions/upload-artifact@v3
with:
name: test-results
path: test-results