File tree Expand file tree Collapse file tree 3 files changed +49
-5
lines changed Expand file tree Collapse file tree 3 files changed +49
-5
lines changed Original file line number Diff line number Diff line change 3131 JAVA_HOME : " /usr/lib/jvm/default-jdk"
3232 steps :
3333 - uses : actions/checkout@v4
34- - name : Install Make
35- run : apt-get -qq update && apt-get -qq install -y make
34+ - name : Install System Dependencies
35+ run : apt-get -qq update && apt-get -qq install -y make curl wget
3636 - name : Install JDK
3737 run : " bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
3838 # TODO: not using setup-java since incompatible with the swiftlang/swift base image
4141 # distribution: 'zulu'
4242 # java-version: '22'
4343 # cache: 'gradle'
44+ - name : Install Nightly Swift
45+ run : " bash -xc './docker/install_nightly_untested_swift.sh'"
4446 - name : Gradle build
4547 run : ./gradlew build --info --no-daemon
4648
5961 JAVA_HOME : " /usr/lib/jvm/default-jdk"
6062 steps :
6163 - uses : actions/checkout@v4
62- - name : Install Make
63- run : apt-get -qq update && apt-get -qq install -y make
64+ - name : Install System Dependencies
65+ run : apt-get -qq update && apt-get -qq install -y make curl wget
6466 - name : Install JDK
6567 run : " bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
6668 - name : Generate sources (make) (Temporary)
Original file line number Diff line number Diff line change @@ -19,4 +19,8 @@ ENV LANGUAGE=en_US.UTF-8
1919COPY install_jdk.sh .
2020RUN bash -xc 'JDK_VENDOR=Corretto ./install_jdk.sh'
2121ENV JAVA_HOME="/usr/lib/jvm/default-jdk"
22- ENV PATH="$PATH:/usr/lib/jvm/default-jdk/bin"
22+ ENV PATH="$PATH:/usr/lib/jvm/default-jdk/bin"
23+
24+ # Install "untested" nightly 'main' Swift
25+ # TODO: Only do this if the released Swift is older than what we require
26+ RUN bash -xc './install_nightly_untested_swift.sh'
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # #===----------------------------------------------------------------------===##
3+ # #
4+ # # This source file is part of the Swift.org open source project
5+ # #
6+ # # Copyright (c) 2024 Apple Inc. and the Swift.org project authors
7+ # # Licensed under Apache License v2.0
8+ # #
9+ # # See LICENSE.txt for license information
10+ # # See CONTRIBUTORS.txt for the list of Swift.org project authors
11+ # #
12+ # # SPDX-License-Identifier: Apache-2.0
13+ # #
14+ # #===----------------------------------------------------------------------===##
15+ set -euo pipefail
16+
17+ echo " Download [nightly] [untested] Swift toolchain for: $( uname -m) "
18+
19+ declare -r SWIFT_UNTESTED_TOOLCHAIN_JOB_URL=" https://ci.swift.org/job/oss-swift-package-ubuntu-22_04/lastSuccessfulBuild/consoleText"
20+
21+ if [[ " $( cat /etc/lsb-release | grep " 22.04" ) " = " " ]]; then
22+ echo " This script specifically only supports Ubuntu 20.04 due to nightly toolchain availability"
23+ exit 1
24+ fi
25+
26+ declare -r UNTESTED_TOOLCHAIN_URL=$( curl -s $SWIFT_UNTESTED_TOOLCHAIN_JOB_URL | grep ' Toolchain: ' | sed ' s/Toolchain: //g' )
27+ declare -r UNTESTED_TOOLCHAIN_FILENAME=$( echo " $UNTESTED_TOOLCHAIN_URL " | awk '
28+ function basename(file) {
29+ sub(".*/", "", file)
30+ return file
31+ }
32+ {print FILENAME, basename(FILENAME)}' )
33+
34+ cd /
35+ curl $UNTESTED_TOOLCHAIN_URL > $UNTESTED_TOOLCHAIN_FILENAME
36+
37+ tar xzf $UNTESTED_TOOLCHAIN_FILENAME
38+ swift -version
You can’t perform that action at this time.
0 commit comments