From e5fb56e81870572c534fdae6a41c42be754a2c24 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 11:15:14 -0500 Subject: [PATCH 01/19] add E2E CI job --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ac76a2d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: E2E tests +on: + push: + pull_request: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout pixie-firmware + uses: actions/checkout@v3 + with: + repository: 'firefly/pixie-firmware' + ref: 'main' + submodules: 'recursive' + - name: Setup node version + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Update firefly-scene submodule to the current branch + run: | + cd ${{ github.workspace }} + git submodule set-branch --branch ${{ github.ref }} components/firefly-scene + git submodule update components/firefly-scene + - name: Verify scene and display components + run: | + ls -la ${{ github.workspace }}/components/firefly-display + ls -la ${{ github.workspace }}/components/firefly-scene + git submodule status + - name: Build pixie-firmware using Docker + id: build + run: | + docker run --rm -v $PWD:/project -w /project -e HOME=/tmp espressif/idf idf.py build + - name: Verify assets + run: | + ls -l ${{ github.workspace }}/build/pixie.bin + ls -l ${{ github.workspace }}/build/bootloader/bootloader.bin + ls -l ${{ github.workspace }}/build/partition_table/partition-table.bin From edf5775c6e4d5022b5abefc418d733ff5b519250 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 12:02:09 -0500 Subject: [PATCH 02/19] add submodule sync --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac76a2d..82441b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: run: | cd ${{ github.workspace }} git submodule set-branch --branch ${{ github.ref }} components/firefly-scene - git submodule update components/firefly-scene + git submodule update components/firefly-scene --remote --checkout --recursive - name: Verify scene and display components run: | ls -la ${{ github.workspace }}/components/firefly-display From eacfc31e14524ca407eab8bd5275fbf13fada9ca Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 12:10:25 -0500 Subject: [PATCH 03/19] get submodule changes from remote --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 82441b4..92db9b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: run: | cd ${{ github.workspace }} git submodule set-branch --branch ${{ github.ref }} components/firefly-scene - git submodule update components/firefly-scene --remote --checkout --recursive + git submodule update --remote --checkout --recursive -- components/firefly-scene - name: Verify scene and display components run: | ls -la ${{ github.workspace }}/components/firefly-display From 57d82e54aec51b767d087cd75e57b83bbe5c47fb Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 12:44:57 -0500 Subject: [PATCH 04/19] scene submodule updates --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 92db9b8..8597220 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,11 +18,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20 - - name: Update firefly-scene submodule to the current branch + - name: Update firefly-scene submodule run: | cd ${{ github.workspace }} - git submodule set-branch --branch ${{ github.ref }} components/firefly-scene - git submodule update --remote --checkout --recursive -- components/firefly-scene + git submodule set-url -- components/firefly-scene ${{ github.repositoryUrl }} + git submodule set-branch -b ${{ github.ref }} -- components/firefly-scene + git submodule update --init --remote --checkout --recursive -- components/firefly-scene - name: Verify scene and display components run: | ls -la ${{ github.workspace }}/components/firefly-display From 250a71b1e54d1355aa81c464692520aa0ee829d3 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 12:51:24 -0500 Subject: [PATCH 05/19] use https instead of git --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8597220..358dfeb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - name: Update firefly-scene submodule run: | cd ${{ github.workspace }} - git submodule set-url -- components/firefly-scene ${{ github.repositoryUrl }} + git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git git submodule set-branch -b ${{ github.ref }} -- components/firefly-scene git submodule update --init --remote --checkout --recursive -- components/firefly-scene - name: Verify scene and display components From 7cb6481ed02dcfba659997191c360df5bf0b87e6 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 12:55:35 -0500 Subject: [PATCH 06/19] use ref_name as full name not found --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 358dfeb..7154d7a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: run: | cd ${{ github.workspace }} git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git - git submodule set-branch -b ${{ github.ref }} -- components/firefly-scene + git submodule set-branch -b ${{ github.ref_name }} -- components/firefly-scene git submodule update --init --remote --checkout --recursive -- components/firefly-scene - name: Verify scene and display components run: | From 8e01a95988ed6c5f7b6d7c65b1f11e43a34c846f Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 12:58:17 -0500 Subject: [PATCH 07/19] sync to get the latest from remote --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7154d7a..b5176f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,7 @@ jobs: run: | cd ${{ github.workspace }} git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git + git submodule sync --recursive -- components/firefly-scene git submodule set-branch -b ${{ github.ref_name }} -- components/firefly-scene git submodule update --init --remote --checkout --recursive -- components/firefly-scene - name: Verify scene and display components From 109172fd6edde96fd45644671570a4fe0e859046 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 13:10:50 -0500 Subject: [PATCH 08/19] print diagnostic --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b5176f4..ee3498c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,8 +22,8 @@ jobs: run: | cd ${{ github.workspace }} git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git - git submodule sync --recursive -- components/firefly-scene git submodule set-branch -b ${{ github.ref_name }} -- components/firefly-scene + cat .gitmodules git submodule update --init --remote --checkout --recursive -- components/firefly-scene - name: Verify scene and display components run: | From 4c987a735c024a7b8a2870d6ad27bf30ae346f3d Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 13:15:37 -0500 Subject: [PATCH 09/19] more diagnostic --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee3498c..177f1cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,7 @@ jobs: node-version: 20 - name: Update firefly-scene submodule run: | + ls -la ${{ github.workspace }} cd ${{ github.workspace }} git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git git submodule set-branch -b ${{ github.ref_name }} -- components/firefly-scene From ae61ea173c25f602cdd2bdf6aa3964ec9d0dcbe7 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 13:21:57 -0500 Subject: [PATCH 10/19] deinit to see if it can pull from remote --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 177f1cf..e2d0379 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,9 +20,10 @@ jobs: node-version: 20 - name: Update firefly-scene submodule run: | - ls -la ${{ github.workspace }} cd ${{ github.workspace }} - git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git + git submodule deinit -- components/firefly-scene + git submodule add -- ${{ github.server_url }}/${{ github.repository}}.git components/firefly-scene + #git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git git submodule set-branch -b ${{ github.ref_name }} -- components/firefly-scene cat .gitmodules git submodule update --init --remote --checkout --recursive -- components/firefly-scene From 4582fe41d099f9572eb96ca4934027f12247ae08 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 13:23:42 -0500 Subject: [PATCH 11/19] pull manually --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2d0379..e34b194 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,10 +20,10 @@ jobs: node-version: 20 - name: Update firefly-scene submodule run: | - cd ${{ github.workspace }} - git submodule deinit -- components/firefly-scene - git submodule add -- ${{ github.server_url }}/${{ github.repository}}.git components/firefly-scene - #git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git + cd ${{ github.workspace }}/components/firefly-scene + git pull + cd - + git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git git submodule set-branch -b ${{ github.ref_name }} -- components/firefly-scene cat .gitmodules git submodule update --init --remote --checkout --recursive -- components/firefly-scene From 5ff103e2e453c786d222e812803c62958eff1878 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 13:26:03 -0500 Subject: [PATCH 12/19] add diagnostic --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e34b194..0746c5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,7 @@ jobs: - name: Update firefly-scene submodule run: | cd ${{ github.workspace }}/components/firefly-scene + git remote -v git pull cd - git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git From f337394eee1fafe2be5ccb29a5e5c60a87059ef2 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 13:36:45 -0500 Subject: [PATCH 13/19] deinit before setting new url --- .github/workflows/build.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0746c5f..fe9bbb4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,10 +20,8 @@ jobs: node-version: 20 - name: Update firefly-scene submodule run: | - cd ${{ github.workspace }}/components/firefly-scene - git remote -v - git pull - cd - + cd ${{ github.workspace }} + git submodule deinit -- components/firefly-scene git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git git submodule set-branch -b ${{ github.ref_name }} -- components/firefly-scene cat .gitmodules From b2670ce6f771cc3c50301d7477b419c54475d739 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 13:42:46 -0500 Subject: [PATCH 14/19] use git instead of github checkout action --- .github/workflows/build.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe9bbb4..341580e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,19 +8,15 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout pixie-firmware - uses: actions/checkout@v3 - with: - repository: 'firefly/pixie-firmware' - ref: 'main' - submodules: 'recursive' - name: Setup node version uses: actions/setup-node@v4 with: node-version: 20 - - name: Update firefly-scene submodule + - name: Checkout pixie-firmware run: | - cd ${{ github.workspace }} + git clone ${{ github.server_url }}/firefly/pixie-firmware.git + cd pixie-firmware + git checkout main git submodule deinit -- components/firefly-scene git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git git submodule set-branch -b ${{ github.ref_name }} -- components/firefly-scene @@ -28,15 +24,17 @@ jobs: git submodule update --init --remote --checkout --recursive -- components/firefly-scene - name: Verify scene and display components run: | - ls -la ${{ github.workspace }}/components/firefly-display - ls -la ${{ github.workspace }}/components/firefly-scene + cd pixie-firmware + ls -laR components git submodule status - name: Build pixie-firmware using Docker id: build run: | + cd pixie-firmware docker run --rm -v $PWD:/project -w /project -e HOME=/tmp espressif/idf idf.py build - name: Verify assets run: | - ls -l ${{ github.workspace }}/build/pixie.bin - ls -l ${{ github.workspace }}/build/bootloader/bootloader.bin - ls -l ${{ github.workspace }}/build/partition_table/partition-table.bin + cd pixie-firmware + ls -l build/pixie.bin + ls -l build/bootloader/bootloader.bin + ls -l build/partition_table/partition-table.bin From 0e712c655be5740574b0143cc68f524db4a51d7b Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 13:45:48 -0500 Subject: [PATCH 15/19] fix missing submodule error --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 341580e..c5a0f81 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: node-version: 20 - name: Checkout pixie-firmware run: | - git clone ${{ github.server_url }}/firefly/pixie-firmware.git + git clone --recurse-submodules ${{ github.server_url }}/firefly/pixie-firmware.git cd pixie-firmware git checkout main git submodule deinit -- components/firefly-scene From c659eb5f8e8f6750ba6b7e495fd50dcef25c345b Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 13:48:59 -0500 Subject: [PATCH 16/19] manually update firefly-display --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c5a0f81..e8feed9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: node-version: 20 - name: Checkout pixie-firmware run: | - git clone --recurse-submodules ${{ github.server_url }}/firefly/pixie-firmware.git + git clone ${{ github.server_url }}/firefly/pixie-firmware.git cd pixie-firmware git checkout main git submodule deinit -- components/firefly-scene @@ -22,10 +22,12 @@ jobs: git submodule set-branch -b ${{ github.ref_name }} -- components/firefly-scene cat .gitmodules git submodule update --init --remote --checkout --recursive -- components/firefly-scene + git submodule update --init --remote --checkout --recursive -- components/firefly-display - name: Verify scene and display components run: | cd pixie-firmware - ls -laR components + ls -la components/firefly-scene + ls -la components/firefly-display git submodule status - name: Build pixie-firmware using Docker id: build From 60672a357573792eea6bb6dbe33811accfec6886 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 14:12:25 -0500 Subject: [PATCH 17/19] try with github checkout action again --- .github/workflows/build.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8feed9..7cdebda 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,11 +12,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20 + - name: Checkout pixie-firmware + uses: actions/checkout@v4 + with: + ref: 'main' - name: Checkout pixie-firmware run: | - git clone ${{ github.server_url }}/firefly/pixie-firmware.git - cd pixie-firmware - git checkout main git submodule deinit -- components/firefly-scene git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git git submodule set-branch -b ${{ github.ref_name }} -- components/firefly-scene @@ -25,18 +26,15 @@ jobs: git submodule update --init --remote --checkout --recursive -- components/firefly-display - name: Verify scene and display components run: | - cd pixie-firmware ls -la components/firefly-scene ls -la components/firefly-display git submodule status - name: Build pixie-firmware using Docker id: build run: | - cd pixie-firmware docker run --rm -v $PWD:/project -w /project -e HOME=/tmp espressif/idf idf.py build - name: Verify assets run: | - cd pixie-firmware ls -l build/pixie.bin ls -l build/bootloader/bootloader.bin ls -l build/partition_table/partition-table.bin From 7ca4c36b05618f458d35da06e1f2294fdb8bb836 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 14:14:10 -0500 Subject: [PATCH 18/19] fix unknown ref error --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7cdebda..fdaf245 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,6 @@ jobs: ref: 'main' - name: Checkout pixie-firmware run: | - git submodule deinit -- components/firefly-scene git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git git submodule set-branch -b ${{ github.ref_name }} -- components/firefly-scene cat .gitmodules From 5279531cd00b2534bc0e25c6a4410141c3bf6317 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Sun, 8 Dec 2024 14:17:48 -0500 Subject: [PATCH 19/19] revert to using git checkout --- .github/workflows/build.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fdaf245..e8feed9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,12 +12,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20 - - name: Checkout pixie-firmware - uses: actions/checkout@v4 - with: - ref: 'main' - name: Checkout pixie-firmware run: | + git clone ${{ github.server_url }}/firefly/pixie-firmware.git + cd pixie-firmware + git checkout main + git submodule deinit -- components/firefly-scene git submodule set-url -- components/firefly-scene ${{ github.server_url }}/${{ github.repository}}.git git submodule set-branch -b ${{ github.ref_name }} -- components/firefly-scene cat .gitmodules @@ -25,15 +25,18 @@ jobs: git submodule update --init --remote --checkout --recursive -- components/firefly-display - name: Verify scene and display components run: | + cd pixie-firmware ls -la components/firefly-scene ls -la components/firefly-display git submodule status - name: Build pixie-firmware using Docker id: build run: | + cd pixie-firmware docker run --rm -v $PWD:/project -w /project -e HOME=/tmp espressif/idf idf.py build - name: Verify assets run: | + cd pixie-firmware ls -l build/pixie.bin ls -l build/bootloader/bootloader.bin ls -l build/partition_table/partition-table.bin