feat(build): add configuration files for VS Code devcontainer #343
Workflow file for this run
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 and Test | |
# Run workflow on pushes to main and develop branches, on any pull request, or by manual dispatch | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
workflow_dispatch: | |
# Define the build test jobs for each configuration | |
jobs: | |
check-contribution: | |
name: Check if changelog and version have been updated | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check contributions | |
if: ${{ github.event.pull_request.base.sha }} | |
run: | | |
git config user.name github-actions[bot] | |
git config user.email github-actions[bot]@users.noreply.github.com | |
git fetch origin main ${{ github.event.pull_request.base.sha }} ${{ github.head_ref }} | |
git checkout ${{ github.head_ref }} | |
VER_DIFF=$(git diff ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- ./VERSION) | |
if ! [ "${VER_DIFF}" ]; then | |
bash update_version.sh --commit && git push | |
fi | |
CL_DIFF=$(git diff ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- ./CHANGELOG.md) | |
if ! [ "${CL_DIFF}" ]; then | |
SEARCH_STRING="## Upcoming changes (in development)" | |
NEW_TITLE="${{ github.event.pull_request.title }} (#${{ github.event.pull_request.number }})" | |
sed -z "s/${SEARCH_STRING}\n/${SEARCH_STRING}\n\n- ${NEW_TITLE}/" -i CHANGELOG.md | |
git add CHANGELOG.md && git commit -m "Update CHANGELOG" && git push | |
fi | |
shell: bash | |
# check if jobs can be skipped | |
check-skippable-changes: | |
name: Check skippable changes | |
runs-on: ubuntu-latest | |
outputs: | |
skip: ${{ steps.check_if_skippable.outputs.should_skip }} | |
steps: | |
- id: check_if_skippable | |
uses: fkirc/skip-duplicate-actions@master | |
with: | |
cancel_others: 'true' | |
do_not_skip: '["workflow_dispatch"]' | |
paths_ignore: '["**.md"]' | |
skip_after_successful_duplicate: 'true' | |
build-test-debug: | |
needs: check-skippable-changes | |
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }} | |
runs-on: ubuntu-latest | |
name: Debug configuration test | |
steps: | |
# First check out the repository | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Load the repository build-test action | |
- name: Build and Test | |
uses: ./.github/actions/build-test | |
with: | |
configuration: Debug | |
build-test-release: | |
needs: check-skippable-changes | |
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }} | |
runs-on: ubuntu-latest | |
name: Release configuration test | |
steps: | |
# First check out the repository | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Load the repository build-test action | |
- name: Build and Test | |
uses: ./.github/actions/build-test | |
with: | |
configuration: Release | |
build-test-python: | |
needs: | |
- check-skippable-changes | |
- build-test-release | |
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }} | |
runs-on: ubuntu-latest | |
name: Python bindings test | |
steps: | |
# First check out the repository | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Load the repository build-test-python action | |
- name: Build and Test Python | |
uses: ./.github/actions/build-test-python | |
build-test-protocol: | |
needs: | |
- check-skippable-changes | |
- build-test-release | |
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }} | |
runs-on: ubuntu-latest | |
name: Protocol library test | |
steps: | |
# First check out the repository | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Load the repository build-test-python action | |
- name: Build and Test Protocol | |
uses: ./.github/actions/build-test-protocol |