From f1d9c353fe7cf5e3aa5f4d92fb1686a27c781b2c Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 15:07:30 +0530 Subject: [PATCH 01/44] wip --- .github/workflows/test.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..f0a20dd3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,18 @@ +on: + push: + branches: + - main + pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + run-test: + runs-on: macos-15-arm64 + steps: + - uses: actions/checkout@v4 + - name: Run Docker + run: | + brew install docker colima + colima start --runtime docker + docker run hello-world:latest From 64df7cc7ba078268af45393dbcf4f1631261d006 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 15:08:51 +0530 Subject: [PATCH 02/44] update runner --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f0a20dd3..9bbf8e88 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ concurrency: cancel-in-progress: true jobs: run-test: - runs-on: macos-15-arm64 + runs-on: macos-15 steps: - uses: actions/checkout@v4 - name: Run Docker From 69924c68293bf3f5ed28476ad454e5ed71ad9ad8 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 15:13:47 +0530 Subject: [PATCH 03/44] wip --- .github/workflows/test.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9bbf8e88..d6ee941f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,12 +7,30 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: + # build-appimage: + # runs-on: ubuntu-24.04-arm + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # - name: Build + # run: | + # docker compose run --build --rm xtool Linux/build.sh + # - name: Upload artifact + # uses: actions/upload-artifact@v4 + # with: + # name: xtool + # path: | + # Linux/packages/xtool-x86_64.AppImage run-test: runs-on: macos-15 steps: - uses: actions/checkout@v4 + # - name: Download artifact + # uses: actions/download-artifact@v4 + # with: + # name: xtool - name: Run Docker run: | - brew install docker colima - colima start --runtime docker + brew install --formula docker colima + brew service start colima docker run hello-world:latest From c4855387242518662b30c703b66f5237e43ba4a6 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 15:14:35 +0530 Subject: [PATCH 04/44] wip --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d6ee941f..e722a30d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,5 +32,5 @@ jobs: - name: Run Docker run: | brew install --formula docker colima - brew service start colima + colima start docker run hello-world:latest From ef59e190ad7deae5743050ccea1b41f4fec0ef70 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 15:14:46 +0530 Subject: [PATCH 05/44] disk --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e722a30d..bf7c3f4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,5 +32,5 @@ jobs: - name: Run Docker run: | brew install --formula docker colima - colima start + colima start --disk 10 docker run hello-world:latest From 6deedd82870a2759906c3032759551b3d1449473 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 15:16:06 +0530 Subject: [PATCH 06/44] wip --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bf7c3f4d..6837c605 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,5 +32,5 @@ jobs: - name: Run Docker run: | brew install --formula docker colima - colima start --disk 10 + colima start --disk 10 || cat /Users/runner/.colima/_lima/colima/ha.stderr.log docker run hello-world:latest From d1621e6cf30d7f1534b8109d4eb080eb23f5a573 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 15:18:14 +0530 Subject: [PATCH 07/44] wip --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6837c605..b8e4958e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: # path: | # Linux/packages/xtool-x86_64.AppImage run-test: - runs-on: macos-15 + runs-on: macos-13 steps: - uses: actions/checkout@v4 # - name: Download artifact @@ -32,5 +32,5 @@ jobs: - name: Run Docker run: | brew install --formula docker colima - colima start --disk 10 || cat /Users/runner/.colima/_lima/colima/ha.stderr.log + colima start || cat /Users/runner/.colima/_lima/colima/ha.stderr.log docker run hello-world:latest From f168423a37057152379a5dfb5e5b9f00e77ab276 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 15:22:44 +0530 Subject: [PATCH 08/44] oop --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8e4958e..60bef75c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,5 +32,4 @@ jobs: - name: Run Docker run: | brew install --formula docker colima - colima start || cat /Users/runner/.colima/_lima/colima/ha.stderr.log docker run hello-world:latest From c6707b4829b543186c15cee0c8bdb3139b067e32 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 15:23:24 +0530 Subject: [PATCH 09/44] nvm --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 60bef75c..575180aa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,4 +32,5 @@ jobs: - name: Run Docker run: | brew install --formula docker colima + colima start --disk 10 docker run hello-world:latest From e638517532790388a595a454074bca681c10becc Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 15:33:39 +0530 Subject: [PATCH 10/44] hm --- .github/workflows/test.yml | 40 ++++++++++++++++++++------------------ scripts/test-linux.sh | 8 ++++++++ 2 files changed, 29 insertions(+), 19 deletions(-) create mode 100755 scripts/test-linux.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 575180aa..4fcd9725 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,30 +7,32 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - # build-appimage: - # runs-on: ubuntu-24.04-arm - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - # - name: Build - # run: | - # docker compose run --build --rm xtool Linux/build.sh - # - name: Upload artifact - # uses: actions/upload-artifact@v4 - # with: - # name: xtool - # path: | - # Linux/packages/xtool-x86_64.AppImage + build-appimage: + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build + run: | + docker compose run --build --rm xtool Linux/build.sh + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: xtool + path: | + Linux/packages/xtool-aarch64.AppImage run-test: + needs: build-appimage runs-on: macos-13 steps: - uses: actions/checkout@v4 - # - name: Download artifact - # uses: actions/download-artifact@v4 - # with: - # name: xtool + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: xtool + path: appimage - name: Run Docker run: | brew install --formula docker colima colima start --disk 10 - docker run hello-world:latest + docker run -v .:/app swift:6.1.1 /app/scripts/test-linux.sh diff --git a/scripts/test-linux.sh b/scripts/test-linux.sh new file mode 100755 index 00000000..ea6572a2 --- /dev/null +++ b/scripts/test-linux.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +export APPIMAGE_EXTRACT_AND_RUN=1 + +cd "$(dirname "$0")" + +ls -la ./appimage +./appimage/xtool-aarch64.AppImage --version From 0f9dfd6fd7c5a169a685dee4e5af479b0b188c33 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 20:42:18 +0530 Subject: [PATCH 11/44] wip --- .github/workflows/test.yml | 44 +++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4fcd9725..5dcad1ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,30 +7,34 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - build-appimage: - runs-on: ubuntu-24.04 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build - run: | - docker compose run --build --rm xtool Linux/build.sh - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: xtool - path: | - Linux/packages/xtool-aarch64.AppImage + # build-appimage: + # runs-on: ubuntu-24.04 + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # - name: Build + # run: | + # docker compose run --build --rm xtool Linux/build.sh + # - name: Upload artifact + # uses: actions/upload-artifact@v4 + # with: + # name: xtool + # path: | + # Linux/packages/xtool-x86_64.AppImage run-test: - needs: build-appimage runs-on: macos-13 steps: - uses: actions/checkout@v4 - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: xtool - path: appimage + # - name: Download artifact + # uses: actions/download-artifact@v4 + # with: + # name: xtool + # path: appimage + - name: Download artifact (temp) + run: | + mkdir appimage + curl -L https://github.com/xtool-org/xtool/releases/download/1.12.2/xtool-x86_64.AppImage -o appimage/xtool-x86_64.AppImage + chmod +x appimage/xtool-x86_64.AppImage - name: Run Docker run: | brew install --formula docker colima From b030d986e87a78d1f51f581e454e280e43da6eb4 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 20:50:59 +0530 Subject: [PATCH 12/44] try qemu --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5dcad1ab..b98afdee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,5 +38,5 @@ jobs: - name: Run Docker run: | brew install --formula docker colima - colima start --disk 10 + colima start --disk 10 --vm-type qemu docker run -v .:/app swift:6.1.1 /app/scripts/test-linux.sh From 8da2dd0a3a3f8022ff7ae4b0736526d274df72d1 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 20:51:52 +0530 Subject: [PATCH 13/44] install --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b98afdee..0cf02e5d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,6 +37,6 @@ jobs: chmod +x appimage/xtool-x86_64.AppImage - name: Run Docker run: | - brew install --formula docker colima + brew install --formula docker colima qemu colima start --disk 10 --vm-type qemu docker run -v .:/app swift:6.1.1 /app/scripts/test-linux.sh From 282119f08e9a10bf7c5aad19f78005265c03f324 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 20:53:11 +0530 Subject: [PATCH 14/44] wip --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee605cd1..ca4dcd43 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,8 @@ on: push: branches: - main - pull_request: + # TODO: re-enable + # pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true From 3ccb144d8097c2263b79c829f1bf2b4defb8f196 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 21:04:58 +0530 Subject: [PATCH 15/44] tweaks --- .github/workflows/test.yml | 4 ++-- scripts/test-linux.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0cf02e5d..5dcad1ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,6 +37,6 @@ jobs: chmod +x appimage/xtool-x86_64.AppImage - name: Run Docker run: | - brew install --formula docker colima qemu - colima start --disk 10 --vm-type qemu + brew install --formula docker colima + colima start --disk 10 docker run -v .:/app swift:6.1.1 /app/scripts/test-linux.sh diff --git a/scripts/test-linux.sh b/scripts/test-linux.sh index ea6572a2..8df4ae40 100755 --- a/scripts/test-linux.sh +++ b/scripts/test-linux.sh @@ -5,4 +5,4 @@ export APPIMAGE_EXTRACT_AND_RUN=1 cd "$(dirname "$0")" ls -la ./appimage -./appimage/xtool-aarch64.AppImage --version +./appimage/xtool-x86_64.AppImage --version From fd8a4438f87697ce4451ba60b4a3fedcd68f4a42 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 21:07:15 +0530 Subject: [PATCH 16/44] More tweaks --- .github/workflows/test.yml | 2 +- scripts/test-linux.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5dcad1ab..4ee02dc1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,4 +39,4 @@ jobs: run: | brew install --formula docker colima colima start --disk 10 - docker run -v .:/app swift:6.1.1 /app/scripts/test-linux.sh + docker run --rm -v .:/app swift:6.1.1 /app/scripts/test-linux.sh diff --git a/scripts/test-linux.sh b/scripts/test-linux.sh index 8df4ae40..0e683d1e 100755 --- a/scripts/test-linux.sh +++ b/scripts/test-linux.sh @@ -2,7 +2,7 @@ export APPIMAGE_EXTRACT_AND_RUN=1 -cd "$(dirname "$0")" +cd "$(dirname "$0")"/.. ls -la ./appimage -./appimage/xtool-x86_64.AppImage --version +./appimage/xtool-$(uname -m).AppImage --version From 5ffeab7203b7094f2f925c329ad0cfecd6389332 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 21:16:49 +0530 Subject: [PATCH 17/44] aa --- .github/workflows/test.yml | 27 ++++++++++++++++++++------- scripts/test-linux.sh | 14 +++++++++++++- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4ee02dc1..3ce4a1ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,22 +15,35 @@ jobs: # - name: Build # run: | # docker compose run --build --rm xtool Linux/build.sh - # - name: Upload artifact + # - name: Upload xtool # uses: actions/upload-artifact@v4 # with: # name: xtool # path: | # Linux/packages/xtool-x86_64.AppImage + build-sdk: + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - name: Build SDK + run: | + swift run xtool sdk build /Applications/Xcode.app . --arch x86_64 + - name: Upload SDK + uses: actions/upload-artifact@v4 + with: + name: sdk + path: darwin.artifactbundle run-test: + needs: [build-sdk] runs-on: macos-13 steps: - uses: actions/checkout@v4 - # - name: Download artifact - # uses: actions/download-artifact@v4 - # with: - # name: xtool - # path: appimage - - name: Download artifact (temp) + - name: Download SDK + uses: actions/download-artifact@v4 + with: + name: sdk + path: artifacts + - name: Download xtool (temp) run: | mkdir appimage curl -L https://github.com/xtool-org/xtool/releases/download/1.12.2/xtool-x86_64.AppImage -o appimage/xtool-x86_64.AppImage diff --git a/scripts/test-linux.sh b/scripts/test-linux.sh index 0e683d1e..10a7412f 100755 --- a/scripts/test-linux.sh +++ b/scripts/test-linux.sh @@ -5,4 +5,16 @@ export APPIMAGE_EXTRACT_AND_RUN=1 cd "$(dirname "$0")"/.. ls -la ./appimage -./appimage/xtool-$(uname -m).AppImage --version +cp ./appimage/xtool-$(uname -m).AppImage /usr/local/bin/xtool + +swift sdk install ./artifacts/sdk/darwin.artifactbundle + +mkdir /work +cd /work + +xtool sdk install /Xcode.app + +xtool new Hello --skip-setup +cd Hello + +xtool dev build --ipa From 9e866531d373fc6970e22b284577df7ab1b3a6d3 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 21:36:19 +0530 Subject: [PATCH 18/44] wip --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ce4a1ec..7e244c2c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,8 @@ jobs: - uses: actions/checkout@v4 - name: Build SDK run: | - swift run xtool sdk build /Applications/Xcode.app . --arch x86_64 + swift build --product xtool + ./.build/debug/xtool sdk build /Applications/Xcode.app . --arch x86_64 - name: Upload SDK uses: actions/upload-artifact@v4 with: From e72b2aba831f0243d88e636c29d718712fa57bf7 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 21:40:47 +0530 Subject: [PATCH 19/44] zip --- .github/workflows/test.yml | 3 ++- scripts/test-linux.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e244c2c..40875d90 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,11 +29,12 @@ jobs: run: | swift build --product xtool ./.build/debug/xtool sdk build /Applications/Xcode.app . --arch x86_64 + zip -yqr darwin.artifactbundle.zip darwin.artifactbundle - name: Upload SDK uses: actions/upload-artifact@v4 with: name: sdk - path: darwin.artifactbundle + path: darwin.artifactbundle.zip run-test: needs: [build-sdk] runs-on: macos-13 diff --git a/scripts/test-linux.sh b/scripts/test-linux.sh index 10a7412f..d91ee236 100755 --- a/scripts/test-linux.sh +++ b/scripts/test-linux.sh @@ -7,7 +7,7 @@ cd "$(dirname "$0")"/.. ls -la ./appimage cp ./appimage/xtool-$(uname -m).AppImage /usr/local/bin/xtool -swift sdk install ./artifacts/sdk/darwin.artifactbundle +swift sdk install ./artifacts/sdk/darwin.artifactbundle.zip mkdir /work cd /work From 40933f3c2f9942c16cd454adc177929a9d18ccea Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 22:02:19 +0530 Subject: [PATCH 20/44] wip --- .github/workflows/test.yml | 10 +++++----- scripts/test-linux.sh | 9 ++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 40875d90..b70eac7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,16 +40,16 @@ jobs: runs-on: macos-13 steps: - uses: actions/checkout@v4 + - name: Download xtool (temp) + run: | + mkdir artifacts + curl -L https://github.com/xtool-org/xtool/releases/download/1.12.2/xtool-x86_64.AppImage -o artifacts/xtool + chmod +x artifacts/xtool - name: Download SDK uses: actions/download-artifact@v4 with: name: sdk path: artifacts - - name: Download xtool (temp) - run: | - mkdir appimage - curl -L https://github.com/xtool-org/xtool/releases/download/1.12.2/xtool-x86_64.AppImage -o appimage/xtool-x86_64.AppImage - chmod +x appimage/xtool-x86_64.AppImage - name: Run Docker run: | brew install --formula docker colima diff --git a/scripts/test-linux.sh b/scripts/test-linux.sh index d91ee236..9b5a0b7b 100755 --- a/scripts/test-linux.sh +++ b/scripts/test-linux.sh @@ -4,16 +4,15 @@ export APPIMAGE_EXTRACT_AND_RUN=1 cd "$(dirname "$0")"/.. -ls -la ./appimage -cp ./appimage/xtool-$(uname -m).AppImage /usr/local/bin/xtool +ls -la ./artifacts -swift sdk install ./artifacts/sdk/darwin.artifactbundle.zip +cp ./artifacts/xtool /usr/local/bin/xtool + +swift sdk install ./artifacts/darwin.artifactbundle.zip mkdir /work cd /work -xtool sdk install /Xcode.app - xtool new Hello --skip-setup cd Hello From 4616d4d5f872bfbbcf551bc654bd2eb0d333cd25 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 22:29:15 +0530 Subject: [PATCH 21/44] tweaks --- .github/workflows/test.yml | 49 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b70eac7d..64e00258 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,20 +7,25 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - # build-appimage: - # runs-on: ubuntu-24.04 - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - # - name: Build - # run: | - # docker compose run --build --rm xtool Linux/build.sh - # - name: Upload xtool - # uses: actions/upload-artifact@v4 - # with: - # name: xtool - # path: | - # Linux/packages/xtool-x86_64.AppImage + build-appimage: + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build (temp) + run: | + mkdir -p Linux/packages + curl -L https://github.com/xtool-org/xtool/releases/download/1.12.2/xtool-x86_64.AppImage \ + -o Linux/packages/xtool-x86_64.AppImage + chmod +x Linux/packages/xtool-x86_64.AppImage + # - name: Build + # run: | + # docker compose run --build --rm xtool Linux/build.sh + - name: Upload xtool + uses: actions/upload-artifact@v4 + with: + name: xtool-bin + path: Linux/packages/xtool-x86_64.AppImage build-sdk: runs-on: macos-15 steps: @@ -33,25 +38,21 @@ jobs: - name: Upload SDK uses: actions/upload-artifact@v4 with: - name: sdk + name: xtool-sdk path: darwin.artifactbundle.zip run-test: - needs: [build-sdk] + needs: [build-sdk, build-appimage] runs-on: macos-13 steps: - uses: actions/checkout@v4 - - name: Download xtool (temp) - run: | - mkdir artifacts - curl -L https://github.com/xtool-org/xtool/releases/download/1.12.2/xtool-x86_64.AppImage -o artifacts/xtool - chmod +x artifacts/xtool - - name: Download SDK + - name: Download artifacts uses: actions/download-artifact@v4 with: - name: sdk + name: xtool-* path: artifacts - name: Run Docker run: | + ls -la artifacts brew install --formula docker colima - colima start --disk 10 + colima start --disk 20 docker run --rm -v .:/app swift:6.1.1 /app/scripts/test-linux.sh From 1bbcba9205345a7f75b56736f27fd14e0364e8a9 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Fri, 30 May 2025 23:07:54 +0530 Subject: [PATCH 22/44] pattern --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 64e00258..ca3370d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,8 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 with: - name: xtool-* + pattern: xtool-* + merge-multiple: true path: artifacts - name: Run Docker run: | From e819df25938129ad1db396bb1c449d8570ad6cb8 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 00:49:42 +0530 Subject: [PATCH 23/44] wip --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca3370d1..23050956 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -54,6 +54,7 @@ jobs: - name: Run Docker run: | ls -la artifacts + mv artifacts/xtool-x86_64.AppImage artifacts/xtool brew install --formula docker colima colima start --disk 20 docker run --rm -v .:/app swift:6.1.1 /app/scripts/test-linux.sh From bf02f6b2b95c020d80d4fc98b89070bbfc12328e Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 00:50:06 +0530 Subject: [PATCH 24/44] chmod --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 23050956..cb5f8a6f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,6 +55,7 @@ jobs: run: | ls -la artifacts mv artifacts/xtool-x86_64.AppImage artifacts/xtool + chmod +x artifacts/xtool brew install --formula docker colima colima start --disk 20 docker run --rm -v .:/app swift:6.1.1 /app/scripts/test-linux.sh From 0fc7c274331fb466ab2314e13cfdd27b651d7239 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 01:56:58 +0530 Subject: [PATCH 25/44] 16.3 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb5f8a6f..c72fe4aa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: - name: Build SDK run: | swift build --product xtool - ./.build/debug/xtool sdk build /Applications/Xcode.app . --arch x86_64 + ./.build/debug/xtool sdk build /Applications/Xcode_16.3.app . --arch x86_64 zip -yqr darwin.artifactbundle.zip darwin.artifactbundle - name: Upload SDK uses: actions/upload-artifact@v4 From 6f8372a6bfdbe707cbbe675cc5bc68fa263a84e2 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 02:32:26 +0530 Subject: [PATCH 26/44] aaaa --- scripts/test-linux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test-linux.sh b/scripts/test-linux.sh index 9b5a0b7b..1cf58379 100755 --- a/scripts/test-linux.sh +++ b/scripts/test-linux.sh @@ -16,4 +16,4 @@ cd /work xtool new Hello --skip-setup cd Hello -xtool dev build --ipa +xtool dev build From e64b53a5299cde471e6fa56fc36a866a4cf55e71 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 03:09:50 +0530 Subject: [PATCH 27/44] tweaks --- .github/workflows/test.yml | 54 ++++++++++++++------------------------ scripts/test-linux.sh | 11 -------- 2 files changed, 20 insertions(+), 45 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c72fe4aa..1d05799b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,54 +8,40 @@ concurrency: cancel-in-progress: true jobs: build-appimage: - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04-arm steps: - name: Checkout uses: actions/checkout@v4 - - name: Build (temp) - run: | - mkdir -p Linux/packages - curl -L https://github.com/xtool-org/xtool/releases/download/1.12.2/xtool-x86_64.AppImage \ - -o Linux/packages/xtool-x86_64.AppImage - chmod +x Linux/packages/xtool-x86_64.AppImage - # - name: Build - # run: | - # docker compose run --build --rm xtool Linux/build.sh + - name: Build + run: docker compose run --build --rm xtool Linux/build.sh - name: Upload xtool uses: actions/upload-artifact@v4 with: name: xtool-bin - path: Linux/packages/xtool-x86_64.AppImage + path: Linux/packages/xtool-aarch64.AppImage build-sdk: runs-on: macos-15 - steps: - - uses: actions/checkout@v4 - - name: Build SDK - run: | - swift build --product xtool - ./.build/debug/xtool sdk build /Applications/Xcode_16.3.app . --arch x86_64 - zip -yqr darwin.artifactbundle.zip darwin.artifactbundle - - name: Upload SDK - uses: actions/upload-artifact@v4 - with: - name: xtool-sdk - path: darwin.artifactbundle.zip - run-test: - needs: [build-sdk, build-appimage] - runs-on: macos-13 steps: - uses: actions/checkout@v4 - name: Download artifacts uses: actions/download-artifact@v4 with: - pattern: xtool-* - merge-multiple: true + pattern: xtool-bin path: artifacts - name: Run Docker run: | - ls -la artifacts - mv artifacts/xtool-x86_64.AppImage artifacts/xtool - chmod +x artifacts/xtool - brew install --formula docker colima - colima start --disk 20 - docker run --rm -v .:/app swift:6.1.1 /app/scripts/test-linux.sh + mkdir -p stage/bin stage/sdks + mv artifacts/xtool-aarch64.AppImage stage/bin/xtool + + swift build --product xtool + ./.build/debug/xtool sdk build /Applications/Xcode_16.3.app ./stage/sdks/ + + brew install --formula docker colima qemu + colima start --disk 20 --vm-type qemu + + docker run --rm \ + -v ./scripts:/scripts \ + -v ./stage/bin:/usr/local/bin \ + -v ./stage/sdks:/root/.swiftpm/swift-sdks \ + swift:6.1.1 \ + /scripts/test-linux.sh diff --git a/scripts/test-linux.sh b/scripts/test-linux.sh index 1cf58379..0da4441a 100755 --- a/scripts/test-linux.sh +++ b/scripts/test-linux.sh @@ -2,17 +2,6 @@ export APPIMAGE_EXTRACT_AND_RUN=1 -cd "$(dirname "$0")"/.. - -ls -la ./artifacts - -cp ./artifacts/xtool /usr/local/bin/xtool - -swift sdk install ./artifacts/darwin.artifactbundle.zip - -mkdir /work -cd /work - xtool new Hello --skip-setup cd Hello From d6da50672262c896ced7db4c0574bf3eb4a6727b Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 03:11:03 +0530 Subject: [PATCH 28/44] arch --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d05799b..30e7c7c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: ./.build/debug/xtool sdk build /Applications/Xcode_16.3.app ./stage/sdks/ brew install --formula docker colima qemu - colima start --disk 20 --vm-type qemu + colima start --disk 20 --vm-type qemu --arch arm64 docker run --rm \ -v ./scripts:/scripts \ From 5bb51d60ab0bd4ec46ba689d3c4c4edf5ea20b13 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 03:20:39 +0530 Subject: [PATCH 29/44] tweakin --- .github/workflows/test.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 30e7c7c4..8e72295f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,8 @@ jobs: with: name: xtool-bin path: Linux/packages/xtool-aarch64.AppImage - build-sdk: + test: + needs: build-appimage runs-on: macos-15 steps: - uses: actions/checkout@v4 @@ -28,15 +29,19 @@ jobs: with: pattern: xtool-bin path: artifacts - - name: Run Docker + - name: Build SDK run: | mkdir -p stage/bin stage/sdks mv artifacts/xtool-aarch64.AppImage stage/bin/xtool swift build --product xtool ./.build/debug/xtool sdk build /Applications/Xcode_16.3.app ./stage/sdks/ - + - name: Run Docker + run: | + # https://github.com/abiosoft/colima/issues/970#issuecomment-2224011277 brew install --formula docker colima qemu + LIMACTL_PATH=$(brew --prefix)/bin/limactl + sudo curl -L -o $LIMACTL_PATH https://github.com/mikekazakov/lima-nohvf/raw/master/limactl && sudo chmod +x $LIMACTL_PATH colima start --disk 20 --vm-type qemu --arch arm64 docker run --rm \ From 8fab4b053375db2e71cc9fe47a877205441a36bb Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 03:21:37 +0530 Subject: [PATCH 30/44] more tweakin --- .github/workflows/test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e72295f..3bb5a5c8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,8 +12,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Build - run: docker compose run --build --rm xtool Linux/build.sh + - name: Build (temp) + run: | + mkdir -p Linux/packages + curl -L https://github.com/xtool-org/xtool/releases/download/1.12.2/xtool-aarch64.AppImage \ + -o Linux/packages/xtool-aarch64.AppImage + chmod +x Linux/packages/xtool-aarch64.AppImage + # - name: Build + # run: docker compose run --build --rm xtool Linux/build.sh - name: Upload xtool uses: actions/upload-artifact@v4 with: From 9b59ddb3319937690a3da258d2511014be2ebc50 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 03:23:07 +0530 Subject: [PATCH 31/44] oops --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3bb5a5c8..a5b7127f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 with: - pattern: xtool-bin + name: xtool-bin path: artifacts - name: Build SDK run: | From 5359e99bb30f0566592e972540e7ae669f1fb439 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 03:35:02 +0530 Subject: [PATCH 32/44] scream --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a5b7127f..ed8f33b6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,6 +39,7 @@ jobs: run: | mkdir -p stage/bin stage/sdks mv artifacts/xtool-aarch64.AppImage stage/bin/xtool + chmod +x stage/bin/xtool swift build --product xtool ./.build/debug/xtool sdk build /Applications/Xcode_16.3.app ./stage/sdks/ @@ -47,7 +48,7 @@ jobs: # https://github.com/abiosoft/colima/issues/970#issuecomment-2224011277 brew install --formula docker colima qemu LIMACTL_PATH=$(brew --prefix)/bin/limactl - sudo curl -L -o $LIMACTL_PATH https://github.com/mikekazakov/lima-nohvf/raw/master/limactl && sudo chmod +x $LIMACTL_PATH + sudo curl -fL -o $LIMACTL_PATH https://github.com/mikekazakov/lima-nohvf/raw/acd34e689a7186d8317116165101b1fa56083542/limactl && sudo chmod +x $LIMACTL_PATH colima start --disk 20 --vm-type qemu --arch arm64 docker run --rm \ From 0270294055c96415e3bcf7a6e43f198c93b4e8a8 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 03:51:18 +0530 Subject: [PATCH 33/44] For real now --- .github/workflows/test.yml | 27 +++++++++++++-------------- scripts/test-linux.sh | 8 -------- 2 files changed, 13 insertions(+), 22 deletions(-) delete mode 100755 scripts/test-linux.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ed8f33b6..41b07325 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,14 +12,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Build (temp) - run: | - mkdir -p Linux/packages - curl -L https://github.com/xtool-org/xtool/releases/download/1.12.2/xtool-aarch64.AppImage \ - -o Linux/packages/xtool-aarch64.AppImage - chmod +x Linux/packages/xtool-aarch64.AppImage - # - name: Build - # run: docker compose run --build --rm xtool Linux/build.sh + - name: Build + run: docker compose run --build --rm xtool Linux/build.sh - name: Upload xtool uses: actions/upload-artifact@v4 with: @@ -30,17 +24,18 @@ jobs: runs-on: macos-15 steps: - uses: actions/checkout@v4 - - name: Download artifacts + - name: Download AppImage uses: actions/download-artifact@v4 with: name: xtool-bin path: artifacts - - name: Build SDK + - name: Stage AppImage run: | mkdir -p stage/bin stage/sdks mv artifacts/xtool-aarch64.AppImage stage/bin/xtool chmod +x stage/bin/xtool - + - name: Build SDK + run: | swift build --product xtool ./.build/debug/xtool sdk build /Applications/Xcode_16.3.app ./stage/sdks/ - name: Run Docker @@ -51,9 +46,13 @@ jobs: sudo curl -fL -o $LIMACTL_PATH https://github.com/mikekazakov/lima-nohvf/raw/acd34e689a7186d8317116165101b1fa56083542/limactl && sudo chmod +x $LIMACTL_PATH colima start --disk 20 --vm-type qemu --arch arm64 - docker run --rm \ - -v ./scripts:/scripts \ + docker run --rm -i \ + -e APPIMAGE_EXTRACT_AND_RUN=1 \ -v ./stage/bin:/usr/local/bin \ -v ./stage/sdks:/root/.swiftpm/swift-sdks \ swift:6.1.1 \ - /scripts/test-linux.sh + bash << EOF + xtool new Hello --skip-setup + cd Hello + xtool dev build + EOF diff --git a/scripts/test-linux.sh b/scripts/test-linux.sh deleted file mode 100755 index 0da4441a..00000000 --- a/scripts/test-linux.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -export APPIMAGE_EXTRACT_AND_RUN=1 - -xtool new Hello --skip-setup -cd Hello - -xtool dev build From 4a8813cc82a6882f6ececc81ec05853ae49c7b10 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 04:16:56 +0530 Subject: [PATCH 34/44] final tweaks maybe --- .github/workflows/build.yml | 3 +- .../workflows/{test.yml => integration.yml} | 31 +++++++++---------- 2 files changed, 15 insertions(+), 19 deletions(-) rename .github/workflows/{test.yml => integration.yml} (68%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca4dcd43..ee605cd1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,8 +2,7 @@ on: push: branches: - main - # TODO: re-enable - # pull_request: + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/test.yml b/.github/workflows/integration.yml similarity index 68% rename from .github/workflows/test.yml rename to .github/workflows/integration.yml index 41b07325..f2a8810e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/integration.yml @@ -28,31 +28,28 @@ jobs: uses: actions/download-artifact@v4 with: name: xtool-bin - path: artifacts - - name: Stage AppImage - run: | - mkdir -p stage/bin stage/sdks - mv artifacts/xtool-aarch64.AppImage stage/bin/xtool - chmod +x stage/bin/xtool + path: stage - name: Build SDK run: | swift build --product xtool - ./.build/debug/xtool sdk build /Applications/Xcode_16.3.app ./stage/sdks/ - - name: Run Docker + ./.build/debug/xtool sdk build /Applications/Xcode_16.3.app stage + # https://github.com/abiosoft/colima/issues/970#issuecomment-2224011277 + - name: Setup Docker run: | - # https://github.com/abiosoft/colima/issues/970#issuecomment-2224011277 brew install --formula docker colima qemu LIMACTL_PATH=$(brew --prefix)/bin/limactl - sudo curl -fL -o $LIMACTL_PATH https://github.com/mikekazakov/lima-nohvf/raw/acd34e689a7186d8317116165101b1fa56083542/limactl && sudo chmod +x $LIMACTL_PATH + sudo curl -fL -o $LIMACTL_PATH https://github.com/mikekazakov/lima-nohvf/raw/acd34e689a7186d8317116165101b1fa56083542/limactl + sudo chmod +x $LIMACTL_PATH colima start --disk 20 --vm-type qemu --arch arm64 + - name: Run test + shell: docker run --rm -i -v ./stage:/stage swift:6.1.1 bash < {0} + run: | + export APPIMAGE_EXTRACT_AND_RUN=1 + + mkdir -p ~/.swiftpm/swift-sdks + ln -fs /stage/darwin.artifactbundle ~/.swiftpm/swift-sdks/ + ln -fs /stage/xtool-aarch64.AppImage /usr/local/bin/xtool - docker run --rm -i \ - -e APPIMAGE_EXTRACT_AND_RUN=1 \ - -v ./stage/bin:/usr/local/bin \ - -v ./stage/sdks:/root/.swiftpm/swift-sdks \ - swift:6.1.1 \ - bash << EOF xtool new Hello --skip-setup cd Hello xtool dev build - EOF From 93d8534bc6c1d7fac1ddbad1bbf41c1bcedba903 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 19:53:03 +0530 Subject: [PATCH 35/44] changes --- .github/workflows/integration.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f2a8810e..b4de8b56 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -29,10 +29,10 @@ jobs: with: name: xtool-bin path: stage - - name: Build SDK + - name: Build xtool run: | swift build --product xtool - ./.build/debug/xtool sdk build /Applications/Xcode_16.3.app stage + ln -fs "$PWD/.build/debug/xtool" /usr/local/bin/xtool # https://github.com/abiosoft/colima/issues/970#issuecomment-2224011277 - name: Setup Docker run: | @@ -41,15 +41,23 @@ jobs: sudo curl -fL -o $LIMACTL_PATH https://github.com/mikekazakov/lima-nohvf/raw/acd34e689a7186d8317116165101b1fa56083542/limactl sudo chmod +x $LIMACTL_PATH colima start --disk 20 --vm-type qemu --arch arm64 + - name: Build SDK + run: | + xtool sdk build /Applications/Xcode_16.3.app stage - name: Run test - shell: docker run --rm -i -v ./stage:/stage swift:6.1.1 bash < {0} run: | - export APPIMAGE_EXTRACT_AND_RUN=1 + docker run --rm -i \ + -v ./stage:/stage \ + swift:6.1.1 \ + bash <<< EOF mkdir -p ~/.swiftpm/swift-sdks ln -fs /stage/darwin.artifactbundle ~/.swiftpm/swift-sdks/ + export APPIMAGE_EXTRACT_AND_RUN=1 ln -fs /stage/xtool-aarch64.AppImage /usr/local/bin/xtool xtool new Hello --skip-setup cd Hello xtool dev build + + EOF From db930397c8e8cb14de5e70e3d5002250093609e3 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 20:12:15 +0530 Subject: [PATCH 36/44] ffs --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index b4de8b56..a2e557f7 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -49,7 +49,7 @@ jobs: docker run --rm -i \ -v ./stage:/stage \ swift:6.1.1 \ - bash <<< EOF + bash << EOF mkdir -p ~/.swiftpm/swift-sdks ln -fs /stage/darwin.artifactbundle ~/.swiftpm/swift-sdks/ From 96f3fd493a3b124f0394981809819a7562c2119d Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sat, 31 May 2025 20:37:16 +0530 Subject: [PATCH 37/44] waaaa --- .github/workflows/integration.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index a2e557f7..215d46ba 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -29,6 +29,8 @@ jobs: with: name: xtool-bin path: stage + - name: Fixup AppImage + run: chmod +x stage/xtool-aarch64.AppImage - name: Build xtool run: | swift build --product xtool From aedbc16d8da1d3d6f33d5b990ea9c11808e35ff7 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Mon, 2 Jun 2025 15:01:53 +0530 Subject: [PATCH 38/44] Build debug AppImage --- .github/workflows/build.yml | 2 +- .github/workflows/integration.yml | 2 +- Linux/build.sh | 6 ++++-- Makefile | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee605cd1..3dd5bdfb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ on: push: branches: - main - pull_request: + # pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 215d46ba..00f130eb 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -13,7 +13,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Build - run: docker compose run --build --rm xtool Linux/build.sh + run: XTL_CONFIG=debug make linux-dist - name: Upload xtool uses: actions/upload-artifact@v4 with: diff --git a/Linux/build.sh b/Linux/build.sh index 87dff15d..072d33cd 100755 --- a/Linux/build.sh +++ b/Linux/build.sh @@ -13,8 +13,10 @@ fi rm -rf staging/tmp mkdir -p staging/tmp staging/linuxdeploy -swift build --package-path .. -c release --product xtool --static-swift-stdlib -bin="$(swift build --package-path .. -c release --show-bin-path)" +RESOLVED_CONFIG="${XTL_CONFIG:-release}" + +swift build --package-path .. -c "${RESOLVED_CONFIG}" --product xtool --static-swift-stdlib +bin="$(swift build --package-path .. -c "${RESOLVED_CONFIG}" --show-bin-path)" strip "${bin}/xtool" curr_git_info="$(curl -fsSL https://api.github.com/repos/linuxdeploy/linuxdeploy/git/refs/tags/continuous)" diff --git a/Makefile b/Makefile index 565ebbfc..4666bf8d 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ linux-clean: .PHONY: linux-dist # dist build for Linux linux-dist: - docker compose run --build --rm xtool Linux/build.sh + docker compose run --build -e XTL_CONFIG --rm xtool Linux/build.sh .PHONY: mac # dev build for macOS From a3f916a1416c68a5d3c292222ee18c6dddcab7bd Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Wed, 4 Jun 2025 00:59:45 +0530 Subject: [PATCH 39/44] tweaks --- .github/workflows/integration.yml | 25 ++++++++++++++++------ macOS/Support/Base.xcconfig | 18 +++++++++++++++- macOS/Support/XToolMac-NoTeam.entitlements | 6 ++++++ macOS/XToolMac/XToolMac.swift | 6 ++++-- 4 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 macOS/Support/XToolMac-NoTeam.entitlements diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 00f130eb..4838c1bc 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -19,6 +19,20 @@ jobs: with: name: xtool-bin path: Linux/packages/xtool-aarch64.AppImage + compression-level: 0 + build-mac: + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - name: Build + run: make mac DEVELOPMENT_TEAM='""' + - name: Package + run: (cd macOS/Build/XcodeInstall && zip -yqr xtool.app.zip xtool.app) + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: xtool-mac + path: macOS/Build/XcodeInstall/xtool.app test: needs: build-appimage runs-on: macos-15 @@ -27,14 +41,13 @@ jobs: - name: Download AppImage uses: actions/download-artifact@v4 with: - name: xtool-bin + pattern: xtool-* + merge-multiple: true path: stage - - name: Fixup AppImage - run: chmod +x stage/xtool-aarch64.AppImage - - name: Build xtool + - name: Process artifacts run: | - swift build --product xtool - ln -fs "$PWD/.build/debug/xtool" /usr/local/bin/xtool + chmod +x stage/xtool-aarch64.AppImage + ln -fs "$PWD/stage/xtool.app/Contents/Resources/bin/xtool" /usr/local/bin/xtool # https://github.com/abiosoft/colima/issues/970#issuecomment-2224011277 - name: Setup Docker run: | diff --git a/macOS/Support/Base.xcconfig b/macOS/Support/Base.xcconfig index 34a90d69..71ed4fff 100644 --- a/macOS/Support/Base.xcconfig +++ b/macOS/Support/Base.xcconfig @@ -1,5 +1,4 @@ GENERATE_INFOPLIST_FILE = YES -CODE_SIGN_ENTITLEMENTS = Support/XToolMac.entitlements CODE_SIGN_STYLE = Automatic ENABLE_HARDENED_RUNTIME = YES @@ -10,3 +9,20 @@ INFOPLIST_KEY_LSApplicationCategoryType = public.app-category.developer-tools #include? "Private-Team.xcconfig" #include? "Private.xcconfig" + +XTL_IS_EMPTY_ = YES +XTL_COERCE_TO_BOOL_YES = YES +XTL_COERCE_TO_BOOL_ = NO +XTL_INVERT_YES = NO +XTL_INVERT_NO = YES + +XTL_HAS_TEAM = $(XTL_INVERT_$(XTL_COERCE_TO_BOOL_$(XTL_IS_EMPTY_$(DEVELOPMENT_TEAM)))) + +XTL_CODE_SIGN_ENTITLEMENTS_NO = Support/XToolMac-NoTeam.entitlements +XTL_CODE_SIGN_ENTITLEMENTS_YES = Support/XToolMac.entitlements +CODE_SIGN_ENTITLEMENTS = $(XTL_CODE_SIGN_ENTITLEMENTS_$(XTL_HAS_TEAM)) + +ENABLE_HARDENED_RUNTIME = $(XTL_HAS_TEAM) + +XTL_TEAM_DEFINE_YES = -DHAS_TEAM +OTHER_SWIFT_FLAGS = $(inherited) $(XTL_TEAM_DEFINE_$(XTL_HAS_TEAM)) diff --git a/macOS/Support/XToolMac-NoTeam.entitlements b/macOS/Support/XToolMac-NoTeam.entitlements new file mode 100644 index 00000000..6631ffa6 --- /dev/null +++ b/macOS/Support/XToolMac-NoTeam.entitlements @@ -0,0 +1,6 @@ + + + + + + diff --git a/macOS/XToolMac/XToolMac.swift b/macOS/XToolMac/XToolMac.swift index a4a97008..1ea700d8 100644 --- a/macOS/XToolMac/XToolMac.swift +++ b/macOS/XToolMac/XToolMac.swift @@ -15,8 +15,10 @@ import XKit } private static func runXTool() async throws { - try await withDependencies { - $0.keyValueStorage = KeychainStorage(service: "sh.xtool.keychain.credentials") + try await withDependencies { d in + #if HAS_TEAM + d.keyValueStorage = KeychainStorage(service: "sh.xtool.keychain.credentials") + #endif } operation: { try await XTool.run() } From 4330429925f5e6dcb9105e17851620c6287e65f4 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Wed, 4 Jun 2025 00:59:59 +0530 Subject: [PATCH 40/44] oop --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 4838c1bc..d4f24695 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -34,7 +34,7 @@ jobs: name: xtool-mac path: macOS/Build/XcodeInstall/xtool.app test: - needs: build-appimage + needs: [build-appimage, build-mac] runs-on: macos-15 steps: - uses: actions/checkout@v4 From a79e2da24f5356ecf1cf8ac70b9b42ee83c3e809 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Wed, 4 Jun 2025 01:03:01 +0530 Subject: [PATCH 41/44] xcodegen --- .github/workflows/integration.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index d4f24695..f4a0c27e 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -25,7 +25,9 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build - run: make mac DEVELOPMENT_TEAM='""' + run: | + brew install xcodegen + make mac DEVELOPMENT_TEAM='""' - name: Package run: (cd macOS/Build/XcodeInstall && zip -yqr xtool.app.zip xtool.app) - name: Upload From 27201619a0516f8ac0c5fbcc4104f9f668e97d5a Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Wed, 4 Jun 2025 01:19:43 +0530 Subject: [PATCH 42/44] aa --- .github/workflows/integration.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f4a0c27e..42934be3 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -28,13 +28,11 @@ jobs: run: | brew install xcodegen make mac DEVELOPMENT_TEAM='""' - - name: Package - run: (cd macOS/Build/XcodeInstall && zip -yqr xtool.app.zip xtool.app) - name: Upload uses: actions/upload-artifact@v4 with: name: xtool-mac - path: macOS/Build/XcodeInstall/xtool.app + path: macOS/Build/XcodeInstall/ test: needs: [build-appimage, build-mac] runs-on: macos-15 From 49de7eb940b75b563f422ff60f662e22affb1b43 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Wed, 4 Jun 2025 02:20:07 +0530 Subject: [PATCH 43/44] permissions oops --- .github/workflows/integration.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 42934be3..84d7f746 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -28,11 +28,14 @@ jobs: run: | brew install xcodegen make mac DEVELOPMENT_TEAM='""' + - name: Package + run: (cd macOS/Build/XcodeInstall && zip -yqr xtool.app.zip xtool.app) - name: Upload uses: actions/upload-artifact@v4 with: name: xtool-mac - path: macOS/Build/XcodeInstall/ + path: macOS/Build/XcodeInstall/xtool.app.zip + compression-level: 0 test: needs: [build-appimage, build-mac] runs-on: macos-15 @@ -47,6 +50,7 @@ jobs: - name: Process artifacts run: | chmod +x stage/xtool-aarch64.AppImage + unzip -q stage/xtool.app.zip -d stage ln -fs "$PWD/stage/xtool.app/Contents/Resources/bin/xtool" /usr/local/bin/xtool # https://github.com/abiosoft/colima/issues/970#issuecomment-2224011277 - name: Setup Docker From 370d940f5ea3ab7044c785e97e293e9c3d01849f Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Wed, 4 Jun 2025 15:07:45 +0530 Subject: [PATCH 44/44] small tweaks --- .github/workflows/integration.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 84d7f746..4966d3bb 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -14,10 +14,10 @@ jobs: uses: actions/checkout@v4 - name: Build run: XTL_CONFIG=debug make linux-dist - - name: Upload xtool + - name: Upload AppImage uses: actions/upload-artifact@v4 with: - name: xtool-bin + name: xtool-linux-aarch64 path: Linux/packages/xtool-aarch64.AppImage compression-level: 0 build-mac: @@ -28,9 +28,8 @@ jobs: run: | brew install xcodegen make mac DEVELOPMENT_TEAM='""' - - name: Package - run: (cd macOS/Build/XcodeInstall && zip -yqr xtool.app.zip xtool.app) - - name: Upload + (cd macOS/Build/XcodeInstall && zip -yqr xtool.app.zip xtool.app) + - name: Upload app uses: actions/upload-artifact@v4 with: name: xtool-mac @@ -41,7 +40,7 @@ jobs: runs-on: macos-15 steps: - uses: actions/checkout@v4 - - name: Download AppImage + - name: Download artifacts uses: actions/download-artifact@v4 with: pattern: xtool-*