forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
Move CI build commands to separate scripts #13
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2b983bf
Move CI build commands to separate scripts
MaxDesiatov 3e69832
Run CI on pushes to `swiftwasm` branch
MaxDesiatov 2c58fc7
Split build and setup steps into separate scrtipts
MaxDesiatov efe78b9
Fix execution directories in the build scripts
MaxDesiatov 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 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#/bin/bash | ||
|
||
utils/build-script --release --wasm --verbose \ | ||
--skip-build-benchmarks \ | ||
--extra-cmake-options=" \ | ||
-DSWIFT_SDKS='WASM;LINUX' \ | ||
-DSWIFT_BUILD_SOURCEKIT=FALSE \ | ||
-DSWIFT_ENABLE_SOURCEKIT_TESTS=FALSE \ | ||
-DCMAKE_AR='$sourcedir/wasi-sdk/bin/llvm-ar' \ | ||
-DCMAKE_RANLIB='$sourcedir/wasi-sdk/bin/llvm-ranlib' \ | ||
" \ | ||
--build-stdlib-deployment-targets "wasm-wasm32" \ | ||
--build-swift-static-stdlib \ | ||
--install-destdir="$sourcedir/install" \ | ||
--install-prefix="/opt/swiftwasm-sdk" \ | ||
--install-swift \ | ||
--installable-package="$sourcedir/swiftwasm.tar.gz" \ | ||
--llvm-targets-to-build "X86;WebAssembly" \ | ||
--stdlib-deployment-targets "wasm-wasm32" \ | ||
--wasm-icu-data "todo-icu-data" \ | ||
--wasm-icu-i18n "$sourcedir/icu_out/lib" \ | ||
--wasm-icu-i18n-include "$sourcedir/icu_out/include" \ | ||
--wasm-icu-uc "$sourcedir/icu_out/lib" \ | ||
--wasm-icu-uc-include "$sourcedir/icu_out/include" \ | ||
--wasm-wasi-sdk "$sourcedir/wasi-sdk" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#/bin/bash | ||
|
||
./utils/build-script --release --wasm --verbose \ | ||
--skip-build-benchmarks \ | ||
--extra-cmake-options=" \ | ||
-DSWIFT_PRIMARY_VARIANT_SDK:STRING=WASM \ | ||
-DSWIFT_PRIMARY_VARIANT_ARCH:STRING=wasm32 \ | ||
-DSWIFT_OSX_x86_64_ICU_STATICLIB=TRUE \ | ||
-DSWIFT_BUILD_SOURCEKIT=FALSE \ | ||
-DSWIFT_ENABLE_SOURCEKIT_TESTS=FALSE \ | ||
-DCMAKE_AR='/usr/local/opt/llvm/bin/llvm-ar' \ | ||
-DCMAKE_RANLIB='/usr/local/opt/llvm/bin/llvm-ranlib' \ | ||
" \ | ||
--build-stdlib-deployment-targets "wasm-wasm32" \ | ||
--build-swift-dynamic-sdk-overlay false \ | ||
--build-swift-static-sdk-overlay false \ | ||
--build-swift-static-stdlib \ | ||
--llvm-targets-to-build "X86;WebAssembly" \ | ||
--stdlib-deployment-targets "wasm-wasm32" \ | ||
--wasm-icu-data "todo-icu-data" \ | ||
--wasm-icu-i18n "$sourcedir/icu_out/lib" \ | ||
--wasm-icu-i18n-include "$sourcedir/icu_out/include" \ | ||
--wasm-icu-uc "$sourcedir/icu_out/lib" \ | ||
--wasm-icu-uc-include "$sourcedir/icu_out/include" \ | ||
--wasm-wasi-sdk "$sourcedir/wasi-sdk" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#/bin/bash | ||
|
||
sudo apt update | ||
sudo apt install \ | ||
git ninja-build clang python \ | ||
uuid-dev libicu-dev icu-devtools libbsd-dev \ | ||
libedit-dev libxml2-dev libsqlite3-dev swig \ | ||
libpython-dev libncurses5-dev pkg-config \ | ||
libblocksruntime-dev libcurl4-openssl-dev \ | ||
systemtap-sdt-dev tzdata rsync | ||
|
||
export current_sha=`git rev-parse HEAD` | ||
./utils/update-checkout --clone --scheme wasm | ||
git checkout $current_sha | ||
export sourcedir=$PWD/.. | ||
cd $sourcedir | ||
|
||
wget -O install_cmake.sh "https://github.com/Kitware/CMake/releases/download/v3.15.3/cmake-3.15.3-Linux-x86_64.sh" | ||
chmod +x install_cmake.sh | ||
sudo mkdir -p /opt/cmake | ||
sudo ./install_cmake.sh --skip-license --prefix=/opt/cmake | ||
sudo ln -sf /opt/cmake/bin/* /usr/local/bin | ||
cmake --version | ||
|
||
wget -O wasi-sdk.tar.gz https://github.com/swiftwasm/wasi-sdk/releases/download/20190421.6/wasi-sdk-3.19gefb17cb478f9.m-linux.tar.gz | ||
tar xfz wasi-sdk.tar.gz | ||
mv wasi-sdk-3.19gefb17cb478f9+m/opt/wasi-sdk ./wasi-sdk | ||
|
||
wget -O icu.tar.xz "https://github.com/swiftwasm/icu4c-wasi/releases/download/20190421.3/icu4c-wasi.tar.xz" | ||
tar xf icu.tar.xz | ||
|
||
cd swift | ||
./build-linux.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#/bin/bash | ||
|
||
brew install cmake ninja llvm | ||
export current_sha=`git rev-parse HEAD` | ||
./utils/update-checkout --clone --scheme wasm | ||
git checkout $current_sha | ||
export sourcedir=$PWD/.. | ||
cd $sourcedir | ||
wget -O wasi-sdk.tar.gz https://github.com/swiftwasm/wasi-sdk/releases/download/20190421.6/wasi-sdk-3.19gefb17cb478f9.m-linux.tar.gz | ||
tar xfz wasi-sdk.tar.gz | ||
mv wasi-sdk-3.19gefb17cb478f9+m/opt/wasi-sdk ./wasi-sdk | ||
# Link sysroot/usr/include to sysroot/include because Darwin sysroot doesn't | ||
# find header files in sysroot/include but sysroot/usr/include | ||
mkdir wasi-sdk/share/sysroot/usr/ | ||
ln -s ../include wasi-sdk/share/sysroot/usr/include | ||
wget -O icu.tar.xz "https://github.com/swiftwasm/icu4c-wasi/releases/download/20190421.3/icu4c-wasi.tar.xz" | ||
tar xf icu.tar.xz | ||
|
||
cd swift | ||
./build-mac.sh |
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.
Could you separate this script into setup script and build command or skip to download dependencies if they are already downloaded?
This script try to download dependencies even if try just to build locally.