Skip to content

Commit 5d8ac14

Browse files
authored
Add post-merge CI and build release workflows (#185)
After squashing and mergin a commit on top of what's on the main branch there can be merge issues. Add a post-merge (ie. push) trigger for the same workflows that are used for pull requests to help flag merge issues. For these workflows, it will be useful to upload the release artifacts in case someone would like to manually test it. In the future there is also a possibility of larger e2e test suites that could run on fresh Linux containers without existing swift toolchains. Add a new workflow to produce release artifacts for Linux on a manual workflow dispatch either from the GitHub UI, or via the REST interface.
1 parent 9748352 commit 5d8ac14

File tree

2 files changed

+51
-11
lines changed

2 files changed

+51
-11
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version of swiftly to build release artifacts"
8+
required: true
9+
type: string
10+
default: "0.3.0"
11+
skip:
12+
description: "Perform release checks, such as the git tag, and swift version, or '--skip' to skip that."
13+
required: true
14+
type: string
15+
default: "--skip"
16+
17+
jobs:
18+
buildrelease:
19+
name: Build Release
20+
runs-on: ubuntu-latest
21+
container:
22+
image: "swift:6.0-rhel-ubi9"
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
- name: Build Artifact
27+
run: swift run build-swiftly-release ${{ inputs.skip }} ${{ inputs.version }}
28+
- name: Upload Artifact
29+
uses: actions/upload-artifact@v4
30+
with:
31+
path: .build/release/swiftly-*.tar.gz
32+
if-no-files-found: error

.github/workflows/pull_request.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
name: Pull request
1+
name: Pull Request
22

33
on:
44
pull_request:
55
types: [opened, reopened, synchronize]
6+
push:
7+
branches: [main]
68

79
jobs:
810
soundness:
@@ -28,16 +30,22 @@ jobs:
2830
linux_pre_build_command: ./scripts/prep-gh-action.sh && ./scripts/install-libarchive.sh
2931
enable_windows_checks: false
3032

31-
releasebuild:
32-
name: Release Build
33-
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
34-
with:
35-
linux_os_versions: "[\"rhel-ubi9\"]"
36-
# We only care about the current stable release, because that's where we make our swiftly releases
37-
linux_exclude_swift_versions: "[{\"swift_version\": \"nightly-main\"},{\"swift_version\": \"nightly-6.0\"},{\"swift_version\": \"5.8\"},{\"swift_version\": \"5.9\"},{\"swift_version\": \"5.10\"}]"
38-
linux_pre_build_command: ./scripts/prep-gh-action.sh
39-
linux_build_command: swift run build-swiftly-release --skip 0.4.0
40-
enable_windows_checks: false
33+
releasebuildcheck:
34+
name: Release Build Check
35+
runs-on: ubuntu-latest
36+
container:
37+
image: "swift:6.0-rhel-ubi9"
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v4
41+
- name: Build Artifact
42+
run: swift run build-swiftly-release --skip "999.0.0"
43+
- name: Upload Artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
path: .build/release/swiftly-*.tar.gz
47+
if-no-files-found: error
48+
retention-days: 1
4149

4250
formatcheck:
4351
name: Format Check

0 commit comments

Comments
 (0)