Skip to content

Switch to GitHub Actions #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
@@ -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.3
run: sudo xcode-select -s /Applications/Xcode_11.3.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
43 changes: 43 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -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.3
run: sudo xcode-select -s /Applications/Xcode_11.3.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/[email protected]
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
2 changes: 1 addition & 1 deletion SWIFT-VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
swift-5.0.1-RELEASE
swift-5.1.3-RELEASE
50 changes: 0 additions & 50 deletions azure-pipelines.yml

This file was deleted.

2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -x

set -euo pipefail

SWIFT_SOURCE=/tmp/swift-source
Expand Down
3 changes: 3 additions & 0 deletions clone.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -x

set -euo pipefail

SWIFT_VERSION=$(cat SWIFT-VERSION)
Expand All @@ -8,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"
2 changes: 1 addition & 1 deletion package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down