unxip 2.2 #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
paths: | |
- '*.swift' | |
- 'Makefile' | |
- '.github/workflows/*' | |
pull_request: | |
paths: | |
- '*.swift' | |
- 'Makefile' | |
- '.github/workflows/*' | |
branches: | |
- main | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [macos-13, ubuntu-22.04] | |
name: Test | |
runs-on: ${{ matrix.os }} | |
environment: ci | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: System Info | |
run: uname -a | |
- name: Install Swift | |
if: ${{ !startsWith( matrix.os, 'macos' ) }} | |
run: eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" && brew install swift | |
- name: Download Xcode | |
run: wget http://server.saagarjha.com/Xcode_15_beta.xip.encrypted | |
# I don't hate you, I just don't want to get sued | |
- name: Decrypt Xcode | |
env: | |
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }} | |
run: openssl enc -aes-256-cbc -d -pass 'env:ENCRYPTION_KEY' -in Xcode_15_beta.xip.encrypted > Xcode_15_beta.xip | |
- name: Build unxip | |
run: swift build --configuration release | |
- name: Run unxip | |
run: .build/release/unxip Xcode_15_beta.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. Note that this means we need to test for existence | |
# ourselves! | |
- name: Validate Xcode | |
if: ${{ startsWith( matrix.os, 'macos' ) }} | |
run: diff -r Xcode-beta.app /Applications/Xcode_15.0.app > diff || true; cat diff && ! test -s diff && test -d /Applications/Xcode_15.0.app |