Build puppet-runtime for Linux on PRs #206
Workflow file for this run
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: Runtime tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| env: | |
| BUNDLE_WITHOUT: development | |
| jobs: | |
| vanagon_inspect: | |
| name: Vanagon inspect | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout current PR | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Ruby version 3.3 | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.3 | |
| bundler-cache: true | |
| - name: Vanagon inspect | |
| run: | | |
| stat=0 | |
| for projfile in configs/projects/[a-z]*.rb; do | |
| for plat in el-8-x86_64 ubuntu-22.04-amd64 windows-all-x64; do | |
| proj=$(basename -s .rb "$projfile") | |
| if [[ "$proj" =~ ^pe- && "$plat" =~ ^(windows|osx) ]]; then | |
| echo Skipping ${proj} on ${plat}, PE projects don\'t support Windows or macOS | |
| continue | |
| fi | |
| echo Inspecting ${proj} on ${plat} | |
| output=$(bundle exec vanagon inspect "$proj" "$plat") | |
| if [ $? -ne 0 ]; then | |
| stat=1 | |
| else | |
| echo "$output" | jq '.[].name' | |
| fi | |
| done | |
| done | |
| # fail this step if there were any failures | |
| if [ $stat -eq 1 ]; then | |
| false | |
| fi | |
| - name: Run rubocop | |
| run: bundle exec rubocop | |
| # this takes roughly 10 minutes for linux, so it's fine to run it on all PRs | |
| # MacOS / Windows takes ages, so we don't want to run this always | |
| build: | |
| needs: vanagon_inspect | |
| name: build puppet-runtime for Linux | |
| uses: 'openvoxproject/shared-actions/.github/workflows/build_vanagon.yml@main' | |
| with: | |
| project_name: 'agent-runtime-main' | |
| # when we add new OSes here, we also need to add them in openvoxproject/shared-actions | |
| # TODO: Split OS list into Linux and non-linux, then run Linux on all PRs | |
| platform_list: amazon-2-aarch64,amazon-2-x86_64,amazon-2023-aarch64,amazon-2023-x86_64,debian-11-aarch64,debian-11-amd64,debian-12-aarch64,debian-12-amd64,debian-13-aarch64,debian-13-amd64,debian-13-armhf,el-8-aarch64,el-8-x86_64,el-9-aarch64,el-9-x86_64,el-10-x86_64,el-10-aarch64,fedora-42-x86_64,fedora-42-aarch64,fedora-43-x86_64,fedora-43-aarch64,sles-15-x86_64,ubuntu-22.04-aarch64,ubuntu-22.04-amd64,ubuntu-24.04-aarch64,ubuntu-24.04-amd64,ubuntu-24.04-armhf,ubuntu-25.04-amd64,ubuntu-25.04-aarch64,ubuntu-25.04-armhf | |
| vanagon_branch: main | |
| upload_to_s3: false | |
| tests: | |
| if: always() | |
| needs: | |
| - vanagon_inspect | |
| - build | |
| runs-on: ubuntu-24.04 | |
| name: Test suite | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |