debugging memory #135
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_container | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
on: | |
pull_request: | |
push: | |
tag: | |
- '*' | |
jobs: | |
build_container: | |
runs-on: ubuntu-22.04 | |
outputs: | |
json: ${{ steps.metadata.outputs.json }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: login to ghcr.io | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: extract metadata | |
id: metadata | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,event=tag | |
type=ref,event=pr | |
type=ref,event=branch | |
- name: build container | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
labels: ${{ steps.metadata.outputs.labels }} | |
tags: ${{ steps.metadata.outputs.tags }} | |
- name: debug | |
run: echo "${{ fromJSON(steps.metadata.outputs.json).tags[0] }}" | |
build-willow-dist: | |
strategy: | |
matrix: | |
device: | |
- ESP32_S3_BOX | |
- ESP32_S3_BOX_LITE | |
runs-on: ubuntu-22.04 | |
needs: build_container | |
container: | |
image: ${{ fromJSON(needs.build_container.outputs.json).tags[0] }} | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.github_token }} | |
volumes: | |
- "${{github.workspace}}:/willow" | |
# https://github.com/actions/runner/issues/878#issuecomment-1248930921 | |
defaults: | |
run: | |
working-directory: /willow | |
env: | |
dist_filename: "willow-dist-${{ matrix.device }}.bin" | |
ota_filename: "willow-ota-${{ matrix.device }}.bin" | |
partitions_filename: "willow-partitions-${{ matrix.device }}" | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: debug | |
run: echo ${{ needs.build_container.outputs.tags }} | |
- name: ls -al | |
run: ls -al | |
- name: ls -al / | |
run: ls -al / | |
# fatal: detected dubious ownership in repository at '/willow' | |
- name: id | |
run: id | |
# ./utils.sh: line 193: idf.py: command not found | |
# - name: . $IDF_PATH/export.sh | |
# run: . "$IDF_PATH/export.sh" | |
# need to run it in the same step as utils.sh bloody hell | |
- name: env | |
run: env | |
- name: pwd | |
run: pwd | |
- name: add /willow to git safe directories | |
run: git config --global --add safe.directory /willow | |
# need to run with bash to avoid this error: | |
# /opt/esp/idf/export.sh: [[: not found | |
- name: ./utils.sh setup | |
run: ( . "$IDF_PATH/export.sh"; ./utils.sh setup ) | |
shell: bash | |
- name: append device type to sdkconfig | |
run: echo "CONFIG_${{ matrix.device }}_BOARD=y" >> sdkconfig | |
- name: ./utils.sh build | |
run: ( . "$IDF_PATH/export.sh"; ./utils.sh build ) | |
shell: bash | |
- name: ./utils.sh dist | |
run: ( . "$IDF_PATH/export.sh"; ./utils.sh dist ) | |
shell: bash | |
- name: copy willow.bin to ota_filename | |
run: cp /willow/build/willow.bin "/willow/build/${{ env.ota_filename }}" | |
- name: upload willow-dist.bin artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "${{ env.dist_filename }}" | |
path: "/willow/build/${{ env.dist_filename }}" | |
- name: upload willow-ota.bin artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "${{ env.ota_filename }}" | |
path: "/willow/build/${{ env.ota_filename }}" | |
- name: upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "${{ env.partitions_filename }}" | |
path: | | |
/willow/build/*.bin | |
/willow/build/srmodels/srmodels.bin | |
/willow/partitions_willow.csv | |
/willow/sdkconfig | |
!/willow/build/${{ env.dist_filename }} | |
publish-release: | |
if: github.ref_type == 'tag' | |
runs-on: ubuntu-22.04 | |
needs: build-willow-dist | |
steps: | |
- name: download artifacts | |
uses: actions/download-artifact@v3 | |
- name: pwd | |
run: pwd | |
- name: find -ls | |
run: find -ls | |
- name: create release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: false | |
artifacts: "willow-dist-*/willow-dist-*.bin,willow-ota-*/willow-ota-*.bin" | |
prerelease: ${{ contains(github.ref, 'pre') }} |