Skip to content

Build Status

Build Status #1483

Workflow file for this run

name: Build Status
env:
# Run full CI Monday and Thursday at 3:25am EST (08:25 UTC)
# Note: do not run scheduled jobs on the hour exactly, per:
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
# GitHub Actions schedules can sometimes delay by up to 15 minutes due to platform load
FULL_CI_SCHEDULE: '25 8 * * 1,4'
on:
push:
branches:
- main
tags:
- v*
paths-ignore:
- LICENSE
- NOTICE
- README.md
- "docs/**"
pull_request:
branches:
- main
paths-ignore:
- LICENSE
- NOTICE
- README.md
- "docs/**"
workflow_dispatch:
inputs:
ci-full:
description: "Run Full CI"
required: false
type: boolean
default: false
schedule:
- cron: '25 8 * * 1,4'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: write
checks: write
pull-requests: write
id-token: write # for pypi test release
jobs:
########################################################
#......................................................#
#..|########|..|###\.....|##|..|########|..|########|..#
#.....|##|.....|##|##\...|##|.....|##|.....|########|..#
#.....|##|.....|##|\##\..|##|.....|##|........|##|.....#
#.....|##|.....|##|.\##\.|##|.....|##|........|##|.....#
#.....|##|.....|##|..\##\|##|.....|##|........|##|.....#
#.....|##|.....|##|...\##\#/......|##|........|##|.....#
#..|########|..|##|....\##/....|########|.....|##|.....#
#......................................................#
########################################################
# Stage One - Initialize the build #
########################################################
# This is so we can inspect the latest commit message from
# both push and pull_request events (there is no
# github.event.head_commit.message otherwise on pull
# requests)
initialize:
runs-on: ubuntu-24.04
outputs:
COMMIT_MESSAGE: ${{ steps.setup.outputs.COMMIT_MSG }}
FULL_RUN: ${{ steps.setuppush.outputs.FULL_RUN || steps.setuppr.outputs.FULL_RUN || steps.setupmanual.outputs.FULL_RUN || steps.setupschedule.outputs.FULL_RUN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# for pull_request so we can do HEAD^2
fetch-depth: 2
- name: Get Commit Message
run: echo "COMMIT_MSG=$(git log -1 --pretty=%B HEAD | tr '\n' ' ')" >> $GITHUB_ENV
if: ${{ github.event_name == 'push' }}
- name: Get Commit Message
run: echo "COMMIT_MSG=$(git log -1 --pretty=%B HEAD^2 | tr '\n' ' ')" >> $GITHUB_ENV
if: ${{ github.event_name == 'pull_request' }}
- name: Display and Setup Build Args (Push)
id: setuppush
run: |
echo "Commit Message: $COMMIT_MSG"
echo "Full Run: $FULL_RUN"
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo "FULL_RUN=$FULL_RUN" >> $GITHUB_OUTPUT
env:
FULL_RUN: ${{ startsWith(github.ref_name, 'v') || contains(github.event.head_commit.message, '[ci-full]') }}
if: ${{ github.event_name == 'push' }}
- name: Display and Setup Build Args (PR)
id: setuppr
run: |
echo "Commit Message: $COMMIT_MSG"
echo "Full Run: $FULL_RUN"
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo "FULL_RUN=$FULL_RUN" >> $GITHUB_OUTPUT
env:
FULL_RUN: ${{ contains(github.event.pull_request.title, '[ci-full]') || contains(env.COMMIT_MSG, '[ci-full]') }}
if: ${{ github.event_name == 'pull_request' }}
- name: Display and Setup Build Args (Manual)
id: setupmanual
run: |
echo "Commit Message: $COMMIT_MSG"
echo "Full Run: $FULL_RUN"
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo "FULL_RUN=$FULL_RUN" >> $GITHUB_OUTPUT
env:
FULL_RUN: ${{ github.event.inputs.ci-full }}
if: ${{ github.event_name == 'workflow_dispatch' }}
- name: Display and Setup Build Args (Schedule)
id: setupschedule
run: |
echo "Commit Message: $COMMIT_MSG"
echo "Full Run: $FULL_RUN"
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo "FULL_RUN=$FULL_RUN" >> $GITHUB_OUTPUT
env:
FULL_RUN: ${{ github.event.schedule == env.FULL_CI_SCHEDULE }}
if: ${{ github.event_name == 'schedule' }}
################################################################
#..............................................................#
#..|########\..|##|..|##|..|########|..|##|........|#######\...#
#..|##|../##/..|##|..|##|.....|##|.....|##|........|##|..\##\..#
#..|##|./##/...|##|..|##|.....|##|.....|##|........|##|..|##|..#
#..|##||#<.....|##|..|##|.....|##|.....|##|........|##|..|##|..#
#..|##|.\##\...|##|..|##|.....|##|.....|##|........|##|..|##|..#
#..|##|..\##\..|##|..|##|.....|##|.....|########|..|##|../##/..#
#..|########/..|########|..|########|..|########|..|#######/...#
#..............................................................#
#..../####\....|#######\...|########|..../####\....|########|..#
#../##/..\##\..|##|..\##\.....|##|...../##/..\##\..|########|..#
#...\##\.......|##|..|##|.....|##|......\##\..........|##|.....#
#.....\##\.....|##|..|##|.....|##|........\##\........|##|.....#
#.......\##\...|##|..|##|.....|##|..........\##\......|##|.....#
#..\##\./##/...|##|../##/.....|##|.....\##\./##/......|##|.....#
#...\####/.....|#######/...|########|...\####/........|##|.....#
#..............................................................#
################################################################
# Stage Three - Build SDist #
################################################################
build_sdist:
needs:
- initialize
strategy:
matrix:
os:
- ubuntu-24.04
python-version:
- 3.9
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: ./.github/actions/setup-python
with:
version: '${{ matrix.python-version }}'
- name: Install python dependencies
run: make requirements
- name: Python SDist Steps
run: make dist-py-sdist
- name: Check sdist
run: make dist-check
- name: Upload SDist
uses: actions/upload-artifact@v4
with:
name: csp-sdist
path: dist/*.tar.gz
################################################################
#..............................................................#
#..|########|..|########|..../####\....|########|..............#
#..|########|..|##|......../##/..\##\..|########|..............#
#.....|##|.....|##|.........\##\..........|##|.................#
#.....|##|.....|########|.....\##\........|##|.................#
#.....|##|.....|##|.............\##\......|##|.................#
#.....|##|.....|##|........\##\../##/.....|##|.................#
#.....|##|.....|########|...\####/........|##|.................#
#..............................................................#
#..../####\....|#######\...|########|..../####\....|########|..#
#../##/..\##\..|##|..\##\.....|##|...../##/..\##\..|########|..#
#...\##\.......|##|..|##|.....|##|......\##\..........|##|.....#
#.....\##\.....|##|..|##|.....|##|........\##\........|##|.....#
#.......\##\...|##|..|##|.....|##|..........\##\......|##|.....#
#..\##\./##/...|##|../##/.....|##|.....\##\./##/......|##|.....#
#...\####/.....|#######/...|########|...\####/........|##|.....#
#..............................................................#
################################################################
# Stage Four - Build / test the SDist #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
test_sdist:
needs:
- initialize
- build_sdist
strategy:
matrix:
os:
- ubuntu-24.04
python-version:
- 3.9
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: ./.github/actions/setup-python
with:
version: '${{ matrix.python-version }}'
- name: Set up Caches
uses: ./.github/actions/setup-caches
- name: Install python dependencies
run: make requirements
- name: Install requirements
run: sudo dependencies-debian
- uses: actions/download-artifact@v4
with:
name: csp-sdist
path: dist/
- name: Install sdist
run: |
python -m pip install -U -vvv dist/csp*.tar.gz
python -m pip install -U --no-deps -vvv dist/csp*.tar.gz --target .
env:
CCACHE_DIR: /home/runner/work/csp/csp/.ccache
VCPKG_DEFAULT_BINARY_CACHE: /home/runner/vcpkg_cache
VCPKG_DOWNLOADS: /home/runner/vcpkg_download_cache
- name: Run tests against from-scratch sdist build
run: make test
env:
CSP_TEST_SKIP_EXAMPLES: "1"