Skip to content

Commit

Permalink
Add a CI script
Browse files Browse the repository at this point in the history
  • Loading branch information
saagarjha committed Nov 2, 2022
1 parent 99e5578 commit 5ab1cdc
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
pull_request:
branches: [master]

jobs:
test:
runs-on: macos-12
steps:
- uses: actions/checkout@v2

- name: Install xcodes
run: brew install robotsandpencils/made/xcodes

- name: Download Xcode
run: xcodes download --directory "$PWD" 14.0.1

- name: Build unxip
run: swift build --configuration release

- name: Run unxip
run: .build/release/unxip Xcode-14.0.1+14A400.xip

# diff on Monterey is gnudiff, which exits with EXIT_TROUBLE (2) if it
# finds problems. The Xcode bundle has a ruby symlink that is recursive,
# which trips this. So don't rely on the status, but instead use the
# output exclusively.
- name: Validate Xcode
run: diff -r Xcode.app /Applications/Xcode_14.0.1.app > diff || true; cat diff && ! test -s diff

0 comments on commit 5ab1cdc

Please sign in to comment.