remove exceed dara in 8850's csrt table #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and upload AML artifacts | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Configure, build and upload per-platform artifacts | |
| runs-on: ubuntu-latest | |
| outputs: | |
| platforms: ${{ steps.prepare.outputs.platforms }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake ninja-build python3 python3-pip jq acpica-tools | |
| - name: Configure CMake | |
| run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release | |
| - name: Build | |
| run: cmake --build build -- -j$(nproc) | |
| - name: Run test suite | |
| run: | | |
| set -euo pipefail | |
| cd build | |
| make test | |
| - name: Collect AMLs into per-platform directories | |
| id: prepare | |
| run: | | |
| set -euo pipefail | |
| mkdir -p artifacts | |
| platforms=() | |
| for dir in build/*/; do | |
| if [ -d "$dir" ]; then | |
| shopt -s nullglob | |
| aml_files=("$dir"/*.aml) | |
| if [ ${#aml_files[@]} -gt 0 ]; then | |
| platform=$(basename "$dir") | |
| echo "Packaging $platform into directory..." | |
| mkdir -p "artifacts/${platform}" | |
| cp -f "$dir"/*.aml "artifacts/${platform}/" || true | |
| platforms+=("$platform") | |
| fi | |
| shopt -u nullglob | |
| fi | |
| done | |
| # Convert platforms array to JSON using jq | |
| if [ ${#platforms[@]} -gt 0 ]; then | |
| PLATFORMS_JSON=$(printf '%s\n' "${platforms[@]}" | jq -R -s -c 'split("\n")[:-1]') | |
| else | |
| PLATFORMS_JSON='[]' | |
| fi | |
| echo "Found platforms: $PLATFORMS_JSON" | |
| echo "platforms=$PLATFORMS_JSON" >> $GITHUB_OUTPUT | |
| - name: Upload all platform directories as a single artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: aml-all | |
| path: artifacts | |
| upload: | |
| name: Upload platform artifacts | |
| needs: build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: ${{ fromJson(needs.build.outputs.platforms) }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download aml-all artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: aml-all | |
| path: ./ | |
| - name: Find per-platform directory | |
| id: find | |
| run: | | |
| set -euo pipefail | |
| PLATFORM="${{ matrix.platform }}" | |
| echo "Searching for platform directory: $PLATFORM" | |
| # Try several candidate locations that may exist depending on how the artifact was uploaded | |
| if [ -d "aml-all/artifacts/$PLATFORM" ]; then | |
| echo "Found at aml-all/artifacts/$PLATFORM" | |
| echo "path=aml-all/artifacts/$PLATFORM" >> $GITHUB_OUTPUT | |
| elif [ -d "artifacts/$PLATFORM" ]; then | |
| echo "Found at artifacts/$PLATFORM" | |
| echo "path=artifacts/$PLATFORM" >> $GITHUB_OUTPUT | |
| elif [ -d "$PLATFORM" ]; then | |
| echo "Found at $PLATFORM" | |
| echo "path=$PLATFORM" >> $GITHUB_OUTPUT | |
| else | |
| echo "platform_path not found for $PLATFORM" | |
| echo "path=" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Upload per-platform artifact | |
| if: steps.find.outputs.path != '' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform }} | |
| path: ${{ steps.find.outputs.path }} |