Build & Test Platform Services #1132
This file contains 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 & Test Platform Services | |
run-name: Build & Test Platform Services | |
on: | |
# Allow on pull request | |
pull_request: | |
# Allow manually triggering the workflow | |
workflow_dispatch: | |
# Also schedule the workflow to run hourly automatically | |
# ShipIt job will sync hourly around HH:21, so schedule the run with 15 minute offset | |
schedule: | |
- cron: '36 * * * *' | |
jobs: | |
Platform-Services-Build: | |
runs-on: 32-core-ubuntu | |
steps: | |
- run: echo "Confirming hardware specications:"; sudo lscpu | |
- name: Clean workspace | |
run: sudo rm -rf ${{ github.workspace }}/* | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Run Docker-based build for FBOSS | |
run: > | |
sudo | |
./fboss/oss/scripts/docker-build.py | |
--scratch-path | |
${{ github.workspace }}/build-output | |
--target | |
github_actions_fboss_platform_services | |
--no-docker-output | |
--no-system-deps | |
--env-var | |
GITHUB_ACTIONS_BUILD | |
- name: Package FBOSS binaries and library dependencies | |
run: > | |
sudo | |
./fboss/oss/scripts/package-fboss.py | |
--scratch-path | |
${{ github.workspace }}/build-output | |
--compress | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fboss | |
path: ${{ github.workspace }}/build-output/fboss_bins.tar.gz | |
Platform-Services-Test: | |
runs-on: ubuntu-latest | |
needs: Platform-Services-Build | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Download artifact with test binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: fboss | |
- run: ls ${{ github.workspace }} | |
- name: Run unit tests | |
run: > | |
sudo | |
./fboss/oss/scripts/github_actions/docker-unittest.py | |
${{ github.workspace }}/fboss_bins.tar.gz |