Skip to content

integrate zj-common-scripts as a submodule #57

integrate zj-common-scripts as a submodule

integrate zj-common-scripts as a submodule #57

Workflow file for this run

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: C/C++ CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-22.04
steps:
# Github checkout action | https://github.com/actions/checkout
# Private repo checkout | https://github.com/actions/checkout/issues/116#issuecomment-644419389
# The PAT for a user (personal access token) can created in [Github -> settings -> Developer settings -> Personal access tokens]
# For the following "token" entry, it's giving the this repo's workflow via the PAT access to user's other private repos
# You have to set it for this repo in [Repo -> Settings -> Secrets and variables -> Actions]
- name: Checkout repository with submodules
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.ZJ_REPO_PAT }}
# Multi-line command | https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- name: Install common dependencies
run: bash ./scripts/zj-common-scripts/zj-dependencies.bash
- name: Install package dependencies
run: bash ./scripts/zj-package-dependencies.bash
- name: Build, test and install
run: bash ./scripts/zj-common-scripts/zj-build-install-example.bash
- name: Build and run client project example
run: bash ./client-project-example/zj-build-run-client-example.bash
- name: Setup and run pre-commit
run: bash ./scripts/zj-common-scripts/zj-pre-commit.bash