From 1736c6417f2afe29fe63d34eec822aee35738984 Mon Sep 17 00:00:00 2001 From: Oscar Bonilla <6f6231@gmail.com> Date: Fri, 13 Dec 2019 17:52:12 -0800 Subject: [PATCH 1/4] Switch to GitHub Actions --- .github/workflows/PR.yml | 20 +++++++++++++++ .github/workflows/master.yml | 43 +++++++++++++++++++++++++++++++ azure-pipelines.yml | 50 ------------------------------------ 3 files changed, 63 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/PR.yml create mode 100644 .github/workflows/master.yml delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml new file mode 100644 index 0000000..b5005b4 --- /dev/null +++ b/.github/workflows/PR.yml @@ -0,0 +1,20 @@ +name: PR + +on: pull_request + +jobs: + build: + name: build + runs-on: macos-latest + steps: + - uses: actions/checkout@v1 + - name: Select Xcode 11.2 + run: sudo xcode-select -s /Applications/Xcode_11.2.app + - name: Install dependencies + run: brew install ninja cmake lrzip + - name: Cloning Swift + run: ./clone.sh + - name: Building Swift + run: ./build.sh + - name: Packaging Swift + run: ./package.sh diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml new file mode 100644 index 0000000..edf9b47 --- /dev/null +++ b/.github/workflows/master.yml @@ -0,0 +1,43 @@ +name: master + +on: + push: + branches: + - master + +jobs: + build: + name: Build and Publish + runs-on: macos-latest + steps: + - uses: actions/checkout@v1 + - name: Select Xcode 11.2 + run: sudo xcode-select -s /Applications/Xcode_11.2.app + - name: Install Dependencies + run: brew install ninja cmake lrzip + - name: Clone Swift Repos + run: ./clone.sh + - name: Build Swift + run: ./build.sh + - name: Package Swift + run: ./package.sh + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./release/* + asset_name: my-artifact.zip + asset_content_type: application/zip diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 36fb770..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,50 +0,0 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: -# https://aka.ms/yaml - -trigger: -- master - -pr: - autoCancel: true - branches: - include: - - master - -jobs: -- job: macOS - timeoutInMinutes: 360 - displayName: macOS - # According to - # https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/macos/macos-10.14-Readme.md - # macOS-10.14 comes with Xcode 10.2.1 - pool: - displayName: 'macOS 10.14' - vmImage: 'macOS-10.14' - demands: xcode - steps: - - script: 'brew install ninja cmake lrzip' - displayName: 'Installing build dependencies' - - script: | - ./clone.sh - displayName: 'Cloning Swift' - - script: | - ./build.sh - displayName: 'Building Swift' - - script: | - ./package.sh - displayName: 'Packaging Swift' - - task: GitHubRelease@0 - displayName: 'Creating Github Release' - condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/swift-') - inputs: - gitHubConnection: GHRelease - repositoryName: '$(Build.Repository.Name)' - action: 'create' # Options: create, edit, delete - target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit - tagSource: 'manual' # Required when action == Create# Options: auto, manual - tag: '$(Build.SourceVersion)-$(Build.BuildNumber)' - assets: 'release/*' - releaseNotesSource: 'file' # Optional. Options: file, input - releaseNotesFile: 'checksums.md' # Optional From c81377490721188e0a9f35f49108b3b9dd2712e3 Mon Sep 17 00:00:00 2001 From: Oscar Bonilla <6f6231@gmail.com> Date: Fri, 13 Dec 2019 17:59:33 -0800 Subject: [PATCH 2/4] Bump swift version --- SWIFT-VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SWIFT-VERSION b/SWIFT-VERSION index a6b3d05..d23c364 100644 --- a/SWIFT-VERSION +++ b/SWIFT-VERSION @@ -1 +1 @@ -swift-5.0.1-RELEASE +swift-5.1.2-RELEASE From 6e7ede3851960117bbe7da0a07e2b1c96f96a4ef Mon Sep 17 00:00:00 2001 From: Oscar Bonilla <6f6231@gmail.com> Date: Fri, 13 Dec 2019 18:08:23 -0800 Subject: [PATCH 3/4] add debugging --- build.sh | 2 ++ clone.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/build.sh b/build.sh index f389334..e4821be 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -x + set -euo pipefail SWIFT_SOURCE=/tmp/swift-source diff --git a/clone.sh b/clone.sh index 9d515a1..c4085d1 100755 --- a/clone.sh +++ b/clone.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -x + set -euo pipefail SWIFT_VERSION=$(cat SWIFT-VERSION) From 345888f93259cf1b4af51abd3728ccc81753b3c1 Mon Sep 17 00:00:00 2001 From: Oscar Bonilla <6f6231@gmail.com> Date: Wed, 8 Jan 2020 09:51:52 -0800 Subject: [PATCH 4/4] Some bug fixes --- .github/workflows/PR.yml | 4 ++-- .github/workflows/master.yml | 4 ++-- SWIFT-VERSION | 2 +- clone.sh | 1 + package.sh | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index b5005b4..12b68f2 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -8,8 +8,8 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v1 - - name: Select Xcode 11.2 - run: sudo xcode-select -s /Applications/Xcode_11.2.app + - name: Select Xcode 11.3 + run: sudo xcode-select -s /Applications/Xcode_11.3.app - name: Install dependencies run: brew install ninja cmake lrzip - name: Cloning Swift diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index edf9b47..90d884c 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -11,8 +11,8 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v1 - - name: Select Xcode 11.2 - run: sudo xcode-select -s /Applications/Xcode_11.2.app + - name: Select Xcode 11.3 + run: sudo xcode-select -s /Applications/Xcode_11.3.app - name: Install Dependencies run: brew install ninja cmake lrzip - name: Clone Swift Repos diff --git a/SWIFT-VERSION b/SWIFT-VERSION index d23c364..8ed5184 100644 --- a/SWIFT-VERSION +++ b/SWIFT-VERSION @@ -1 +1 @@ -swift-5.1.2-RELEASE +swift-5.1.3-RELEASE diff --git a/clone.sh b/clone.sh index c4085d1..c3aed90 100755 --- a/clone.sh +++ b/clone.sh @@ -10,4 +10,5 @@ SWIFT_SOURCE=/tmp/swift-source mkdir $SWIFT_SOURCE cd $SWIFT_SOURCE git clone https://github.com/apple/swift.git +(cd swift && git checkout "$SWIFT_VERSION") ./swift/utils/update-checkout --clone --tag "$SWIFT_VERSION" diff --git a/package.sh b/package.sh index ad414d8..225ca9f 100755 --- a/package.sh +++ b/package.sh @@ -11,7 +11,7 @@ BUILD_DIR=build/Ninja-RelWithDebInfoAssert RELEASE=release mkdir -p $RELEASE -case `uname -s` in +case $(uname -s) in Darwin) OS=macosx ;;