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 31
31
JAVA_HOME : " /usr/lib/jvm/default-jdk"
32
32
steps :
33
33
- 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
36
36
- name : Install JDK
37
37
run : " bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
38
38
# TODO: not using setup-java since incompatible with the swiftlang/swift base image
41
41
# distribution: 'zulu'
42
42
# java-version: '22'
43
43
# cache: 'gradle'
44
+ - name : Install Nightly Swift
45
+ run : " bash -xc './docker/install_nightly_untested_swift.sh'"
44
46
- name : Gradle build
45
47
run : ./gradlew build --info --no-daemon
46
48
59
61
JAVA_HOME : " /usr/lib/jvm/default-jdk"
60
62
steps :
61
63
- 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
64
66
- name : Install JDK
65
67
run : " bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
66
68
- 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
19
19
COPY install_jdk.sh .
20
20
RUN bash -xc 'JDK_VENDOR=Corretto ./install_jdk.sh'
21
21
ENV 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