Skip to content

Commit 080c2ae

Browse files
ktososhahmishal
andauthored
Prepare for Linux build and CI (#14)
Co-authored-by: Mishal Shah <[email protected]>
1 parent 14612af commit 080c2ae

File tree

119 files changed

+2709
-2165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+2709
-2165
lines changed

.github/workflows/pull_request.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: pull_request
2+
3+
on:
4+
pull_request:
5+
types: [ opened, reopened, synchronize ]
6+
7+
jobs:
8+
soundness:
9+
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
10+
with:
11+
api_breakage_check_enabled: false
12+
# FIXME: Something is off with the format task and it gets "stuck", need to investigate
13+
format_check_enabled: false
14+
license_header_check_project_name: Swift.org
15+
# FIXME: we're about to remove _Subprocess immediately anyway, so rather than fixing it one by one remove this adjusted list and use the default again ASAP
16+
# swift-subprocess includes the word "kill" because SIGKILL signal handling so we allow it
17+
unacceptable_language_check_word_list: "blacklist whitelist slave master sane sanity insane insanity killed killing hang hung hanged hanging" #ignore-unacceptable-language
18+
19+
test-java:
20+
name: Java tests (swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}} os:${{ matrix.os_version }})
21+
runs-on: ubuntu-latest
22+
strategy:
23+
fail-fast: true
24+
matrix:
25+
swift_version: [ 'nightly-main' ]
26+
os_version: [ 'jammy' ]
27+
jdk_vendor: [ 'Corretto' ]
28+
container:
29+
image: ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }}
30+
env:
31+
JAVA_HOME: "/usr/lib/jvm/default-jdk"
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Install Make
35+
run: apt-get -qq update && apt-get -qq install -y make
36+
- name: Install JDK
37+
run: "bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
38+
# TODO: not using setup-java since incompatible with the swiftlang/swift base image
39+
# - uses: actions/setup-java@v4
40+
# with:
41+
# distribution: 'zulu'
42+
# java-version: '22'
43+
# cache: 'gradle'
44+
- name: Generate sources (make) (Temporary)
45+
# TODO: this should be triggered by the respective builds
46+
run: make jextract-run
47+
- name: Gradle build
48+
run: ./gradlew build --no-daemon
49+
50+
test-swift:
51+
name: Swift tests (swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}} os:${{ matrix.os_version }})
52+
runs-on: ubuntu-latest
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
swift_version: [ 'nightly-main' ]
57+
os_version: [ 'jammy' ]
58+
jdk_vendor: [ 'Corretto' ]
59+
container:
60+
image: ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }}
61+
env:
62+
JAVA_HOME: "/usr/lib/jvm/default-jdk"
63+
steps:
64+
- uses: actions/checkout@v4
65+
- name: Install Make
66+
run: apt-get -qq update && apt-get -qq install -y make
67+
- name: Install JDK
68+
run: "bash -xc 'JDK_VENDOR=${{ matrix.jdk_vendor }} ./docker/install_jdk.sh'"
69+
- name: Generate sources (make) (Temporary)
70+
# TODO: this should be triggered by the respective builds
71+
run: "make jextract-run"
72+
- name: Test Swift
73+
run: "swift test"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ DerivedData/
88
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
99
.netrc
1010
*.class
11+
bin/
1112

1213
# Ignore gradle build artifacts
1314
.gradle

.licenseignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.gitignore
2+
.licenseignore
3+
.swiftformatignore
4+
.spi.yml
5+
.swift-format
6+
.github/*
7+
*.md
8+
CONTRIBUTORS.txt
9+
LICENSE.txt
10+
NOTICE.txt
11+
Package.swift
12+
Package.resolved
13+
README.md
14+
SECURITY.md
15+
scripts/unacceptable-language.txt
16+
docker/*
17+
**/*.docc/*
18+
**/.gitignore
19+
**/Package.swift
20+
**/Package.resolved
21+
**/*.md
22+
**/openapi.yml
23+
**/petstore.yaml
24+
**/openapi-generator-config.yaml
25+
**/openapi-generator-config.yml
26+
**/docker-compose.yaml
27+
**/docker/*
28+
**/.dockerignore
29+
JavaSwiftKitDemo/src/main/java/com/example/swift/generated/*
30+
Makefile
31+
**/Makefile
32+
**/*.html
33+
**/CMakeLists.txt
34+
**/*.jar
35+
gradle/wrapper/gradle-wrapper.properties
36+
gradlew
37+
gradlew.bat
38+
**/*.swift2java
39+
Sources/JavaKit/generated/*
40+
Sources/JavaKitJar/generated/*
41+
Sources/JavaKitNetwork/generated/*
42+
Sources/JavaKitReflection/generated/*
43+
Sources/_Subprocess/*
44+
Sources/_Subprocess/**/*
45+
Sources/_SubprocessCShims/*
46+
Sources/_SubprocessCShims/**/*

BuildLogic/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of Swift.org project authors
910
//
1011
// SPDX-License-Identifier: Apache-2.0
1112
//

BuildLogic/settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of Swift.org project authors
910
//
1011
// SPDX-License-Identifier: Apache-2.0
1112
//

BuildLogic/src/main/kotlin/build-logic.java-application-conventions.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of Swift.org project authors
910
//
1011
// SPDX-License-Identifier: Apache-2.0
1112
//

BuildLogic/src/main/kotlin/build-logic.java-common-conventions.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of Swift.org project authors
910
//
1011
// SPDX-License-Identifier: Apache-2.0
1112
//

BuildLogic/src/main/kotlin/build-logic.java-library-conventions.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of Swift.org project authors
910
//
1011
// SPDX-License-Identifier: Apache-2.0
1112
//

JavaSwiftKitDemo/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of Swift.org project authors
910
//
1011
// SPDX-License-Identifier: Apache-2.0
1112
//

JavaSwiftKitDemo/src/main/java/com/example/swift/HelloSubclass.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of Swift.org project authors
910
//
1011
// SPDX-License-Identifier: Apache-2.0
1112
//
1213
//===----------------------------------------------------------------------===//
1314

1415
package com.example.swift;
16+
1517
import com.example.swift.HelloSwift;
1618

1719
public class HelloSubclass extends HelloSwift {

0 commit comments

Comments
 (0)