Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f1d9c35
wip
kabiroberai May 30, 2025
64df7cc
update runner
kabiroberai May 30, 2025
69924c6
wip
kabiroberai May 30, 2025
c485538
wip
kabiroberai May 30, 2025
ef59e19
disk
kabiroberai May 30, 2025
6deedd8
wip
kabiroberai May 30, 2025
d1621e6
wip
kabiroberai May 30, 2025
f168423
oop
kabiroberai May 30, 2025
c6707b4
nvm
kabiroberai May 30, 2025
e638517
hm
kabiroberai May 30, 2025
0f9dfd6
wip
kabiroberai May 30, 2025
b030d98
try qemu
kabiroberai May 30, 2025
8da2dd0
install
kabiroberai May 30, 2025
282119f
wip
kabiroberai May 30, 2025
3ccb144
tweaks
kabiroberai May 30, 2025
fd8a443
More tweaks
kabiroberai May 30, 2025
5ffeab7
aa
kabiroberai May 30, 2025
9e86653
wip
kabiroberai May 30, 2025
e72b2ab
zip
kabiroberai May 30, 2025
40933f3
wip
kabiroberai May 30, 2025
4616d4d
tweaks
kabiroberai May 30, 2025
1bbcba9
pattern
kabiroberai May 30, 2025
e819df2
wip
kabiroberai May 30, 2025
bf02f6b
chmod
kabiroberai May 30, 2025
0fc7c27
16.3
kabiroberai May 30, 2025
6f8372a
aaaa
kabiroberai May 30, 2025
e64b53a
tweaks
kabiroberai May 30, 2025
d6da506
arch
kabiroberai May 30, 2025
5bb51d6
tweakin
kabiroberai May 30, 2025
8fab4b0
more tweakin
kabiroberai May 30, 2025
9b59ddb
oops
kabiroberai May 30, 2025
5359e99
scream
kabiroberai May 30, 2025
0270294
For real now
kabiroberai May 30, 2025
4a8813c
final tweaks maybe
kabiroberai May 30, 2025
f50664a
Merge branch 'main' into test-workflow
kabiroberai May 31, 2025
93d8534
changes
kabiroberai May 31, 2025
db93039
ffs
kabiroberai May 31, 2025
96f3fd4
waaaa
kabiroberai May 31, 2025
1c8fe96
Merge branch 'main' into test-workflow
kabiroberai Jun 2, 2025
aedbc16
Build debug AppImage
kabiroberai Jun 2, 2025
a3f916a
tweaks
kabiroberai Jun 3, 2025
4330429
oop
kabiroberai Jun 3, 2025
a79e2da
xcodegen
kabiroberai Jun 3, 2025
2720161
aa
kabiroberai Jun 3, 2025
49de7eb
permissions oops
kabiroberai Jun 3, 2025
370d940
small tweaks
kabiroberai Jun 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on:
push:
branches:
- main
pull_request:
# pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
on:
push:
branches:
- main
pull_request:
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: XTL_CONFIG=debug make linux-dist
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: xtool-linux-aarch64
path: Linux/packages/xtool-aarch64.AppImage
compression-level: 0
build-mac:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Build
run: |
brew install xcodegen
make mac DEVELOPMENT_TEAM='""'
(cd macOS/Build/XcodeInstall && zip -yqr xtool.app.zip xtool.app)
- name: Upload app
uses: actions/upload-artifact@v4
with:
name: xtool-mac
path: macOS/Build/XcodeInstall/xtool.app.zip
compression-level: 0
test:
needs: [build-appimage, build-mac]
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: xtool-*
merge-multiple: true
path: stage
- 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
run: |
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
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
run: |
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
6 changes: 4 additions & 2 deletions Linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 17 additions & 1 deletion macOS/Support/Base.xcconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
GENERATE_INFOPLIST_FILE = YES
CODE_SIGN_ENTITLEMENTS = Support/XToolMac.entitlements
CODE_SIGN_STYLE = Automatic
ENABLE_HARDENED_RUNTIME = YES

Expand All @@ -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))
6 changes: 6 additions & 0 deletions macOS/Support/XToolMac-NoTeam.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>
6 changes: 4 additions & 2 deletions macOS/XToolMac/XToolMac.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down