-
Notifications
You must be signed in to change notification settings - Fork 33
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
Convert workflows to self-hosted with Swiftly #195
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
7b0c5e1
Test with self-hosted swiftly
cmcgee1024 4c98101
Prepare the docker image before trying to install swiftly
cmcgee1024 8eef5a1
Hard code the architecture
cmcgee1024 13116b8
Correct the swiftly install option
cmcgee1024 19b6983
Add gpg to the action prep script
cmcgee1024 1aaf5a8
Remove Ubuntu 20.04
cmcgee1024 1e48edd
chmod the post install script
cmcgee1024 393d842
Pre-configure tzdata package
cmcgee1024 e12bf8d
Use swiftly to run the install libarchive script for the C compiler
cmcgee1024 4fb93e1
Correct swiftly path
cmcgee1024 9771ba3
Correct swiftly path
cmcgee1024 8fc1a86
Correct path to swift
cmcgee1024 29ae892
Disable fail fast, and run tests outside of proxy
cmcgee1024 13323a9
Move proxy circularity check out of swiftly run
cmcgee1024 4c77cc6
Reduce tests to just jammy, and rely on swiftly being added to the path
cmcgee1024 c558f76
Move swiftly to be a system binary to be on the path
cmcgee1024 342de12
Try and get swiftly into the shell environment
cmcgee1024 2ce77ac
Add assume-yes to the swiftly init and use swiftly run to set PATH
cmcgee1024 b03507a
Update the path for subsequent worklow steps
cmcgee1024 d3e1329
Another attempt at updating the path for subsequent steps
cmcgee1024 fb1d088
Add more detailed environment info
cmcgee1024 03845ef
Show environment file
cmcgee1024 d881d83
Display the shell that is in use
cmcgee1024 fb75fdb
Force bash shell when updating the environment
cmcgee1024 a659f48
Remove extra echo statements and update all swiftly environment varia…
cmcgee1024 38b5a40
Extract swiftly bootstrap version and arch out of the job steps
cmcgee1024 e76ad1d
Missing quote
cmcgee1024 5c7be85
Convert jobs to bootstrap with swiftly
cmcgee1024 40d2eef
Install libarchive before documentation check
cmcgee1024 b4431a8
Update documentation check to a newer ubuntu
cmcgee1024 02ef1a8
Fix cli reference check
cmcgee1024 1a04f8a
Fix quoting problem
cmcgee1024 129055d
Capture more details
cmcgee1024 b65571f
Capture more details
cmcgee1024 5d6764d
Capture more details
cmcgee1024 f9d0594
Pre-install git so that the checkout clones the repo instead of using…
cmcgee1024 765e280
Re-add the exit code option to the git diff
cmcgee1024 335a25a
Consolidate the swiftly and libarchive install into the prep script
cmcgee1024 443619c
Fix quotes
cmcgee1024 154ef74
Skip attempt to run post install script if it does not exist
cmcgee1024 a46fc4e
Fix test job names
cmcgee1024 3f2172d
Add more checks the github prep script
cmcgee1024 d9391f0
Fix test coverage for Ubuntu 20.04
cmcgee1024 25ff40d
Move Ubuntu 20.04 to self-hosted
cmcgee1024 8c1cd93
Remove unnecessary packages for C++ compilation
cmcgee1024 2f46918
Merge branch 'main' of github.com:cmcgee1024/swiftly into self-host-g…
cmcgee1024 9a1a3f5
Merge branch 'main' of github.com:cmcgee1024/swiftly into self-host-g…
cmcgee1024 b40a5c2
Correct the error type
cmcgee1024 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6.0 | ||
6.0.3 |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,56 @@ | ||
#!/bin/bash | ||
|
||
apt-get --help && apt-get update && apt-get -y install curl make | ||
yum --help && (curl --help && yum -y install curl) && yum install make | ||
# This script does a bit of extra preparation of the docker containers used to run the GitHub workflows | ||
# that are specific to this project's needs when building/testing. Note that this script runs on | ||
# every supported Linux distribution so it must adapt to the distribution that it is running. | ||
|
||
(cat /etc/os-release | grep bookworm) && apt-get -y install libstdc++-12-dev gnupg2 | ||
(cat /etc/os-release | grep 'Fedora Linux 39') && yum -y install libstdc++-devel libstdc++-static | ||
# Install the basic utilities depending on the type of Linux distribution | ||
apt-get --help && apt-get update && TZ=Etc/UTC apt-get -y install curl make gpg tzdata | ||
yum --help && (curl --help && yum -y install curl) && yum install make gpg | ||
|
||
exit 0 | ||
set -e | ||
|
||
while [ $# -ne 0 ]; do | ||
arg="$1" | ||
case "$arg" in | ||
--install-swiftly) | ||
installSwiftly=true | ||
;; | ||
*) | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
if [ "$installSwiftly" == true ]; then | ||
echo "Installing swiftly" | ||
curl -O https://download.swift.org/swiftly/linux/swiftly-${SWIFTLY_BOOTSTRAP_VERSION}-$(uname -m).tar.gz && tar zxf swiftly-*.tar.gz && ./swiftly init -y --skip-install | ||
|
||
. "/root/.local/share/swiftly/env.sh" | ||
hash -r | ||
|
||
if [ -n "$GITHUB_ENV" ]; then | ||
echo "Updating GitHub environment" | ||
echo "PATH=$PATH" >> "$GITHUB_ENV" && echo "SWIFTLY_HOME_DIR=$SWIFTLY_HOME_DIR" >> "$GITHUB_ENV" && echo "SWIFTLY_BIN_DIR=$SWIFTLY_BIN_DIR" >> "$GITHUB_ENV" | ||
fi | ||
|
||
if [ -f .swift-version ]; then | ||
echo "Installing selected swift toolchain" | ||
swiftly install --post-install-file=post-install.sh | ||
else | ||
echo "Installing latest toolchain" | ||
swiftly install --post-install-file=post-install.sh latest | ||
fi | ||
|
||
if [ -f post-install.sh ]; then | ||
echo "Performing swift toolchain post-installation" | ||
chmod u+x post-install.sh && ./post-install.sh | ||
fi | ||
|
||
echo "Displaying swift version" | ||
swift --version | ||
|
||
CC=clang swiftly run "$(dirname "$0")/install-libarchive.sh" | ||
else | ||
"$(dirname "$0")/install-libarchive.sh" | ||
fi |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any plans to convert this to 0.4.0 proper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, once we have a final 0.4.0 release we can update this env and use it.