Skip to content

Commit 44f7cce

Browse files
authored
Merge branch 'main' into add-init-decoder-for-attachment-and-network-config
2 parents 565311e + 0557b83 commit 44f7cce

37 files changed

+1192
-265
lines changed

.github/workflows/common.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ jobs:
4949
DEVELOPER_DIR: "/Applications/Xcode-latest.app/Contents/Developer"
5050

5151
- name: Set build configuration
52+
env:
53+
RELEASE: ${{ inputs.release }}
5254
run: |
5355
echo "BUILD_CONFIGURATION=debug" >> $GITHUB_ENV
54-
if [[ "${{ inputs.release }}" == "true" ]]; then
56+
if [[ "${RELEASE}" == "true" ]]; then
5557
echo "BUILD_CONFIGURATION=release" >> $GITHUB_ENV
5658
fi
5759
@@ -65,8 +67,8 @@ jobs:
6567
- name: Create package
6668
run: |
6769
mkdir -p outputs
68-
mv bin/${{ env.BUILD_CONFIGURATION }}/container-installer-unsigned.pkg outputs
69-
mv bin/${{ env.BUILD_CONFIGURATION }}/bundle/container-dSYM.zip outputs
70+
mv "bin/${BUILD_CONFIGURATION}/container-installer-unsigned.pkg" outputs
71+
mv "bin/${BUILD_CONFIGURATION}/bundle/container-dSYM.zip" outputs
7072
7173
- name: Test the container project
7274
run: |
@@ -87,6 +89,11 @@ jobs:
8789
- name: Archive test logs
8890
if: always()
8991
run: |
92+
if [ -d "${APP_ROOT}/containers" ] && [ -n "${LOG_ROOT}" ]; then
93+
rsync -a --include='*/' --include='*.log' --exclude='*' \
94+
"${APP_ROOT}/containers/" \
95+
"${LOG_ROOT}/containers/"
96+
fi
9097
if [ -n "${LOG_ROOT}" ] && [ -d "${LOG_ROOT}" ] ; then
9198
echo "Collecting logs from ${LOG_ROOT}..."
9299
tar czf container-logs.tar.gz -C "$(dirname "${LOG_ROOT}")" "$(basename "${LOG_ROOT}")"
@@ -99,22 +106,22 @@ jobs:
99106
100107
- name: Upload logs if present
101108
if: always()
102-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
109+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
103110
with:
104111
name: container-test-logs
105112
path: container-logs.tar.gz
106113
retention-days: 14
107114
if-no-files-found: ignore
108115

109116
- name: Save documentation artifact
110-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
117+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
111118
with:
112119
name: api-docs
113120
path: "./_site.tgz"
114121
retention-days: 14
115122

116123
- name: Save package artifacts
117-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
124+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
118125
with:
119126
name: container-package
120127
path: ${{ github.workspace }}/outputs
@@ -131,7 +138,7 @@ jobs:
131138
uses: actions/configure-pages@v5
132139

133140
- name: Download a single artifact
134-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
141+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
135142
with:
136143
name: api-docs
137144

.github/workflows/docs-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ jobs:
1414
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') || startsWith(github.ref, 'refs/heads/release')
1515
steps:
1616
- name: Branch validation
17-
run: echo "Branch ${{ github.ref_name }} is allowed"
17+
env:
18+
REF_NAME: ${{ github.ref_name }}
19+
run: echo "Branch ${REF_NAME} is allowed"
1820

1921
buildSite:
2022
name: Build application website

.github/workflows/pr-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ jobs:
1515
- name: Check all commits are signed
1616
env:
1717
GH_TOKEN: ${{ github.token }}
18+
REPO: ${{ github.repository }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
1820
run: |
19-
commits=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/commits --paginate)
21+
commits=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/commits" --paginate)
2022
unsigned_commits=""
2123
2224
while IFS='|' read -r sha author verified; do

.github/workflows/pr-label-analysis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ jobs:
1414

1515
steps:
1616
- name: Save PR metadata
17+
env:
18+
PR_NUMBER: ${{ github.event.pull_request.number }}
1719
run: |
1820
mkdir -p ./pr-metadata
19-
echo "${{ github.event.pull_request.number }}" > ./pr-metadata/pr-number.txt
21+
echo "${PR_NUMBER}" > ./pr-metadata/pr-number.txt
2022
2123
- name: Upload PR metadata as artifact
22-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
24+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
2325
with:
2426
name: pr-metadata-${{ github.event.pull_request.number }}
2527
path: pr-metadata/

.github/workflows/pr-label-apply.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2424

2525
- name: Download PR metadata artifact
26-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
26+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
2727
with:
2828
github-token: ${{ secrets.GITHUB_TOKEN }}
2929
run-id: ${{ github.event.workflow_run.id }}

.github/workflows/release-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
pages: write
3333
steps:
3434
- name: Download artifacts
35-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
35+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
3636
with:
3737
path: outputs
3838

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
pages: write
3333
steps:
3434
- name: Download artifacts
35-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
35+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
3636
with:
3737
path: outputs
3838

BUILDING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,29 @@ To revert to using the Containerization dependency from your `Package.swift`:
127127
bin/container system start
128128
```
129129

130+
## Develop using a local copy of container-builder-shim
131+
132+
To test changes that require the `container-builder-shim` project:
133+
134+
1. Clone the [container-builder-shim](https://github.com/apple/container-builder-shim) repository and navigate to its directory.
135+
136+
2. After making the necessary changes, build the custom builder image, set it as the active builder image, and remove the existing `buildkit` container so the new image will be used:
137+
138+
```bash
139+
container build -t builder .
140+
container system property set image.builder builder:latest
141+
container rm -f buildkit
142+
```
143+
144+
3. Run the `container` build as usual:
145+
146+
```bash
147+
container build ...
148+
```
149+
150+
> [!IMPORTANT]
151+
> If your modified builder image is broken, make sure to rebuild and correctly tag the builder image before attempting to build `container-builder-shim` again.
152+
130153
## Debug XPC Helpers
131154

132155
Attach debugger to the XPC helpers using their launchd service labels:

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ integration: init-block
187187
echo "Starting CLI integration tests" && \
188188
{ \
189189
exit_code=0; \
190+
CLITEST_LOG_ROOT=$(LOG_ROOT) && export CLITEST_LOG_ROOT ; \
190191
$(SWIFT) test -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --filter TestCLINetwork || exit_code=1 ; \
191192
$(SWIFT) test -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --filter TestCLIRunLifecycle || exit_code=1 ; \
192193
$(SWIFT) test -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --filter TestCLIExecCommand || exit_code=1 ; \

Package.resolved

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)