Add /SUBSYSTEM:WINDOWS linker argument for GUI apps on Windows (#110) #301
This file contains hidden or 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: Build macOS | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: macos-15 | |
| steps: | |
| - name: Setup Xcode version | |
| uses: maxim-lobanov/[email protected] | |
| with: | |
| xcode-version: '16.3' # contains Swift 6.1 | |
| - name: Swift version | |
| run: swift --version | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # We build separately for arm64 and x86_64 instead of building a universal binary | |
| # directly because of swiftlang/swift-package-manager#8013. I've tried both Xcode | |
| # 15.0.1 (Swift 5.9) and Xcode 16.2 (Swift 6.0.3), both had the same issue. | |
| - name: Build for arm64 | |
| run: | | |
| swift build -c release --arch arm64 && \ | |
| cp .build/release/swift-bundler swift-bundler-arm64 | |
| - name: Build for x86_64 | |
| run: | | |
| swift build -c release --arch x86_64 && \ | |
| cp .build/release/swift-bundler swift-bundler-x86_64 | |
| - name: Combine into universal binary | |
| run: lipo -create -output swift-bundler swift-bundler-x86_64 swift-bundler-arm64 | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: swift-bundler | |
| path: ./swift-bundler | |
| # Test after uploading the artifact so that we can download the artifact for | |
| # diagnosis. I did consider the fact that this means people could accidentally | |
| # download a faulty version, but people should be downloading from releases | |
| # most of the time, and GitHub makes it pretty obvious when a workflow run has | |
| # failed. | |
| - name: Test | |
| run: swift test |