From edc3de893f28c6eccf99e2c2393d0c1ce595ca56 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 24 Sep 2024 17:05:08 +0200 Subject: [PATCH 1/5] Test arm64 architecture in CI Signed-off-by: Jakub Dzikowski --- .github/workflows/test-on-push.yml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/test-on-push.yml b/.github/workflows/test-on-push.yml index f6eda5a0..84409103 100644 --- a/.github/workflows/test-on-push.yml +++ b/.github/workflows/test-on-push.yml @@ -40,6 +40,40 @@ jobs: - name: Lint run: npm run lint && ./lint.sh + test-arm64: + runs-on: macos-14 + steps: + + - name: Ensure Apple M1 architecture + run: | + uname -a + if [ "$(uname -m)" = "arm64" ]; then + echo "Detected Apple M1 architecture" + else + echo "Not detected Apple M1 architecture" + exit 1 + fi + + - name: Check out repository code + uses: actions/checkout@v2 + + - name: Build Fablo + run: | + npm install && \ + npm run build && \ + ./fablo-build.sh + + - name: Test simple network + run: e2e-network/docker/test-01-simple.sh + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: test-arm64 + path: | + e2e-network/docker/test-01-simple.sh.logs/* + e2e-network/docker/test-01-simple.sh.tmpdir/fablo-target/**/* + # test-k8: # needs: test-main # runs-on: ubuntu-latest From 27b6a384be0dd497dbac5e917976035963213ec3 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 24 Sep 2024 17:13:36 +0200 Subject: [PATCH 2/5] Install Docker for arm64 Signed-off-by: Jakub Dzikowski --- .github/workflows/test-on-push.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test-on-push.yml b/.github/workflows/test-on-push.yml index 84409103..7914160c 100644 --- a/.github/workflows/test-on-push.yml +++ b/.github/workflows/test-on-push.yml @@ -57,6 +57,11 @@ jobs: - name: Check out repository code uses: actions/checkout@v2 + - name: Install Docker + run: | + brew install docker + docker --version + - name: Build Fablo run: | npm install && \ From 21cf452186126cae74cd25f40fc31212287631bb Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 24 Sep 2024 17:25:56 +0200 Subject: [PATCH 3/5] Install Docker for arm64 Signed-off-by: Jakub Dzikowski --- .github/workflows/test-on-push.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-on-push.yml b/.github/workflows/test-on-push.yml index 7914160c..c88f925c 100644 --- a/.github/workflows/test-on-push.yml +++ b/.github/workflows/test-on-push.yml @@ -57,10 +57,17 @@ jobs: - name: Check out repository code uses: actions/checkout@v2 - - name: Install Docker + - name: Install and start Docker run: | - brew install docker + brew install --cask docker docker --version + open /Applications/Docker.app + for i in {1..30}; do + docker version && break + echo "Waiting for Docker to start..." + sleep 10 + done + - name: Build Fablo run: | From 3c2ec25481c72f1a1ae3790c0ce0d733639e4c80 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 24 Sep 2024 17:28:54 +0200 Subject: [PATCH 4/5] Only run CI on push to main branch Signed-off-by: Jakub Dzikowski --- .github/workflows/test-on-push.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-on-push.yml b/.github/workflows/test-on-push.yml index c88f925c..902a628c 100644 --- a/.github/workflows/test-on-push.yml +++ b/.github/workflows/test-on-push.yml @@ -1,6 +1,8 @@ name: Tests on: push: + branches: + - main # Only run on push to main branch pull_request: workflow_dispatch: From 10a38b1538fc49e48d1f118ba1b6e78a02b87858 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 24 Sep 2024 17:33:57 +0200 Subject: [PATCH 5/5] Use colima instead of docker desktop Signed-off-by: Jakub Dzikowski --- .github/workflows/test-on-push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-on-push.yml b/.github/workflows/test-on-push.yml index 902a628c..d3b9c20a 100644 --- a/.github/workflows/test-on-push.yml +++ b/.github/workflows/test-on-push.yml @@ -61,9 +61,9 @@ jobs: - name: Install and start Docker run: | - brew install --cask docker + brew install colima docker docker --version - open /Applications/Docker.app + colima start for i in {1..30}; do docker version && break echo "Waiting for Docker to start..."