Skip to content

Commit

Permalink
zmkfirmware#481: TODO: ci: migrate workflows to zmk-docker
Browse files Browse the repository at this point in the history
Leverages the new zmk-build-arm Docker image published by the zmk-docker project.  Reduces build times, enhances DevOps capabilities, and tightly couples CI build container with the developer container.

TODO:
Once zmk-docker has been adopted by zmkfirmware, replace with:
    container:
      image: ghcr.io/zmkfirmware/zmk-build-arm:2.3
      credentials:
        username: ${{ github.repository_owner }}
        password: ${{ secrets.GHCR_TOKEN }}

PR: zmkfirmware#481
  • Loading branch information
innovaker committed Dec 9, 2020
1 parent e6a27b1 commit 81082d5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 41 deletions.
27 changes: 7 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container:
image: innovaker/zmk-build-arm:2.3
strategy:
matrix:
board:
Expand Down Expand Up @@ -82,25 +84,13 @@ jobs:
timeout-minutes: 2
continue-on-error: true
- name: West init
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-init
with:
args: 'init "-l app"'
run: west init -l app
- name: West update
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-update
with:
args: "update"
run: west update
- name: West config Zephyr base
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-config
with:
args: 'config "--global zephyr.base-prefer configfile"'
run: west config --global zephyr.base-prefer configfile
- name: West Zephyr export
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-zephyr-export
with:
args: "zephyr-export"
run: west zephyr-export
- name: Prepare variables
id: variables
run: |
Expand All @@ -117,10 +107,7 @@ jobs:
echo ::set-output name=shield-arg::${SHIELD_ARG}
echo ::set-output name=artifact-name::${ARTIFACT_NAME}
- name: West build
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-build
with:
args: 'build "-s app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }}'
run: west build -s app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }}
- name: Archive build
uses: actions/upload-artifact@v2
with:
Expand Down
28 changes: 7 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:
jobs:
integration_test:
runs-on: ubuntu-latest
container:
image: innovaker/zmk-build-arm:2.3
steps:
# To use this repository's private action,
# you must check out the repository
Expand All @@ -38,31 +40,15 @@ jobs:
timeout-minutes: 2
continue-on-error: true
- name: West init
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-init
with:
args: 'init "-l app"'
run: west init -l app
- name: West update
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-update
with:
args: "update"
run: west update
- name: West config Zephyr base
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-config
with:
args: 'config "--global zephyr.base-prefer configfile"'
run: west config --global zephyr.base-prefer configfile
- name: West Zephyr export
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-zephyr-export
with:
args: "zephyr-export"
run: west zephyr-export
- name: Test all
uses: "docker://zmkfirmware/zephyr-west-action-arm:latest"
id: west-build
with:
entrypoint: /bin/bash
args: '-c "west test"'
run: west test
- name: Archive build
if: ${{ always() }}
uses: actions/upload-artifact@v2
Expand Down

0 comments on commit 81082d5

Please sign in to comment.