-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Marek128b/hardware
added github workflows test #9
- Loading branch information
Showing
16 changed files
with
769 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Update API Data | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
paths: | ||
- 'keyboards/**' | ||
- 'layouts/community/**' | ||
- 'lib/python/**' | ||
- 'data/**' | ||
- '.github/workflows/api.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
api_data: | ||
env: | ||
working-directory: ./software | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/qmk/qmk_cli | ||
|
||
# protect against those who work in their fork on 'important' branches | ||
if: github.repository == 'qmk/qmk_firmware' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
persist-credentials: false | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip3 install -r requirements-dev.txt | ||
- name: Generate API Data | ||
run: | | ||
qmk generate-api | ||
- name: Upload API Data | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --acl public-read --follow-symlinks --delete | ||
env: | ||
AWS_S3_BUCKET: ${{ github.ref == 'refs/heads/develop' && secrets['API_SPACE_DEVELOP'] || secrets['API_SPACE_MASTER'] }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }} | ||
AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com | ||
SOURCE_DIR: '.build/api_data' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Automatic Approve | ||
|
||
permissions: {} | ||
|
||
on: | ||
schedule: | ||
- cron: "*/5 * * * *" | ||
|
||
jobs: | ||
automatic_approve: | ||
env: | ||
working-directory: ./software | ||
runs-on: ubuntu-latest | ||
|
||
if: github.repository == 'qmk/qmk_firmware' | ||
|
||
steps: | ||
- uses: mheap/automatic-approve-action@v1 | ||
with: | ||
token: ${{ secrets.QMK_BOT_TOKEN }} | ||
workflows: "format.yml,lint.yml,unit_test.yml" | ||
dangerous_files: "lib/python/,Makefile,paths.mk,builddefs/" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Essential files modified | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- builddefs/**/* | ||
- drivers/**/* | ||
- platforms/**/* | ||
- quantum/**/* | ||
- tests/**/* | ||
- tmk_core/**/* | ||
- util/**/* | ||
- Makefile | ||
- '*.mk' | ||
|
||
jobs: | ||
tag: | ||
runs-on: ubuntu-latest | ||
|
||
# protect against those who develop with their fork on master | ||
if: github.repository == 'qmk/qmk_firmware' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Bump version and push tag | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DEFAULT_BUMP: 'patch' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: CI Builds | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
push: | ||
branches: [master, develop] | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
type: choice | ||
description: 'Branch to build' | ||
options: [master, develop] | ||
|
||
concurrency: ci_build-${{ github.event.inputs.branch || github.ref_name }} | ||
|
||
jobs: | ||
ci_builds: | ||
env: | ||
working-directory: ./software | ||
if: github.repository == 'qmk/qmk_firmware' | ||
name: "CI Build" | ||
runs-on: self-hosted | ||
timeout-minutes: 1380 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
keymap: [default, via] | ||
|
||
container: ghcr.io/qmk/qmk_cli | ||
|
||
steps: | ||
- name: Disable safe.directory check | ||
run : git config --global --add safe.directory '*' | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
ref: ${{ github.event.inputs.branch || github.ref }} | ||
|
||
- name: Install dependencies | ||
run: pip3 install -r requirements.txt | ||
|
||
- name: Run `qmk mass-compile` (keymap ${{ matrix.keymap }}) | ||
run: | | ||
export NCPUS=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) | ||
qmk mass-compile -t -j $NCPUS -km ${{ matrix.keymap }} -e DUMP_CI_METADATA=yes || touch .failed | ||
# Generate the step summary markdown | ||
./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true | ||
# Truncate to a maximum of 1MB to deal with GitHub workflow limit | ||
truncate --size='<960K' $GITHUB_STEP_SUMMARY || true | ||
# Exit with failure if the compilation stage failed | ||
[ ! -f .failed ] || exit 1 | ||
- name: 'Upload artifacts' | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: artifacts-${{ github.event.inputs.branch || github.ref_name }}-${{ matrix.keymap }} | ||
if-no-files-found: ignore | ||
path: | | ||
*.bin | ||
*.hex | ||
*.uf2 | ||
.build/failed.* | ||
- name: 'CI Discord Notification' | ||
if: always() | ||
working-directory: util/ci/ | ||
env: | ||
DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }} | ||
run: | | ||
python3 -m pip install -r requirements.txt | ||
python3 ./discord-results.py --branch ${{ github.event.inputs.branch || github.ref_name }} --keymap ${{ matrix.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CLI CI | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request: | ||
paths: | ||
- 'lib/python/**' | ||
- 'requirements.txt' | ||
- '.github/workflows/cli.yml' | ||
|
||
jobs: | ||
test: | ||
env: | ||
working-directory: ./software | ||
runs-on: ubuntu-latest | ||
|
||
container: ghcr.io/qmk/qmk_cli | ||
|
||
steps: | ||
- name: Disable safe.directory check | ||
run : git config --global --add safe.directory '*' | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install dependencies | ||
run: pip3 install -r requirements-dev.txt | ||
- name: Run tests | ||
run: qmk pytest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Update develop after master merge | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
develop_update: | ||
env: | ||
working-directory: ./software | ||
runs-on: ubuntu-latest | ||
|
||
if: github.repository == 'qmk/qmk_firmware' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.QMK_BOT_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- name: Disable automatic eol conversion | ||
run: | | ||
echo "* -text" > .git/info/attributes | ||
- name: Checkout develop | ||
run: | | ||
git fetch origin master develop | ||
git checkout develop | ||
- name: Update develop from master | ||
run: | | ||
git config --global user.name "QMK Bot" | ||
git config --global user.email "[email protected]" | ||
git merge origin/master | ||
git push origin develop |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Generate Docs | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'tmk_core/**' | ||
- 'quantum/**' | ||
- 'platforms/**' | ||
- 'docs/**' | ||
- '.github/workflows/docs.yml' | ||
|
||
jobs: | ||
generate: | ||
env: | ||
working-directory: ./software | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/qmk/qmk_cli | ||
|
||
# protect against those who develop with their fork on master | ||
if: github.repository == 'qmk/qmk_firmware' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Install dependencies | ||
run: | | ||
apt-get update && apt-get install -y rsync nodejs npm doxygen | ||
npm install -g moxygen | ||
- name: Build docs | ||
run: | | ||
qmk --verbose generate-docs | ||
- name: Deploy | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BASE_BRANCH: master | ||
BRANCH: gh-pages | ||
FOLDER: .build/docs | ||
GIT_CONFIG_EMAIL: [email protected] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Update feature branches after develop merge | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
feature_branch_update: | ||
env: | ||
working-directory: ./software | ||
runs-on: ubuntu-latest | ||
|
||
if: github.repository == 'qmk/qmk_firmware' | ||
|
||
strategy: | ||
matrix: | ||
branch: | ||
- xap | ||
- riot | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.QMK_BOT_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- name: Disable automatic eol conversion | ||
run: | | ||
echo "* -text" > .git/info/attributes | ||
- name: Checkout branch | ||
run: | | ||
git fetch origin develop ${{ matrix.branch }} | ||
git checkout ${{ matrix.branch }} | ||
- name: Update branch from develop | ||
run: | | ||
git config --global user.name "QMK Bot" | ||
git config --global user.email "[email protected]" | ||
git merge origin/develop | ||
git push origin ${{ matrix.branch }} |
Oops, something went wrong.