Skip to content

Commit b6ff566

Browse files
authored
fix CI? (#205)
1 parent 44fe6dc commit b6ff566

File tree

7 files changed

+28
-33
lines changed

7 files changed

+28
-33
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
os: [ubuntu-20.04, macos-12]
21+
os: [ubuntu-22.04, macos-13]
2222
runs-on: ${{ matrix.os }}
2323
steps:
24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2525

26-
- uses: actions/setup-java@v3
26+
- uses: actions/setup-java@v4
2727
with:
2828
distribution: 'temurin'
2929
java-version: 17
3030
cache: sbt
31+
32+
- uses: sbt/setup-sbt@v1
3133

3234
- name: Tests
3335
run: sbt test pluginTests checkDocs publishLocal versionDump
@@ -47,11 +49,11 @@ jobs:
4749

4850
- name: Run example
4951
env:
50-
LLVM_BIN: /usr/local/opt/llvm@14/bin
52+
LLVM_BIN: /usr/local/opt/llvm@17/bin
5153
if: startsWith(matrix.os, 'macos-')
5254
run: |
5355
set -e
54-
brew install llvm@14
56+
brew install llvm@17
5557
cd example
5658
SBT_VCPKG_VERSION=$(cat ../version) sbt example/run
5759
@@ -98,9 +100,9 @@ jobs:
98100
- name: Install pkg-config on Windows
99101
run: choco install pkgconfiglite
100102

101-
- uses: actions/checkout@v3
103+
- uses: actions/checkout@v4
102104

103-
- uses: actions/setup-java@v3
105+
- uses: actions/setup-java@v4
104106
with:
105107
distribution: 'temurin'
106108
java-version: 17

Dockerfile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
FROM eclipse-temurin:17-focal
1+
FROM eclipse-temurin:21-jammy
22

33
RUN apt update && apt install -y curl && \
4-
curl -Lo /usr/local/bin/sbt https://raw.githubusercontent.com/sbt/sbt/1.8.x/sbt && \
4+
curl -Lo /usr/local/bin/sbt https://raw.githubusercontent.com/sbt/sbt/1.10.x/sbt && \
55
chmod +x /usr/local/bin/sbt && \
66
curl -Lo llvm.sh https://apt.llvm.org/llvm.sh && \
77
chmod +x llvm.sh && \
88
apt install -y lsb-release wget software-properties-common gnupg && \
9-
./llvm.sh 14 && \
9+
./llvm.sh 17 && \
1010
apt update && \
11-
apt install -y zip unzip tar make cmake autoconf pkg-config
11+
apt install -y zip unzip tar make cmake autoconf pkg-config git
1212

1313
COPY . /sources
1414

15-
RUN apt install -y git
16-
17-
ENV LLVM_BIN "/usr/lib/llvm-14/bin"
18-
ENV CC "/usr/lib/llvm-14/bin/clang"
15+
ENV LLVM_BIN "/usr/lib/llvm-17/bin"
16+
ENV CC "/usr/lib/llvm-17/bin/clang"
1917
ENV PATH="${PATH}:/root/.local/share/coursier/bin"
2018

2119
ENV SBT_VCPKG_VERSION dev

example/.scalafmt.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
version = "3.7.15"
2+
runner.dialect = scala213

example/build.sbt

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ vcpkgDependencies := VcpkgDependencies(
99

1010
resolvers += Resolver.sonatypeRepo("snapshots")
1111

12-
scalaVersion := "3.2.2"
12+
scalaVersion := "3.6.3"
1313

1414
import bindgen.interface.Binding
1515

@@ -22,28 +22,22 @@ vcpkgNativeConfig ~= {
2222
bindgenBindings := {
2323
val configurator = vcpkgConfigurator.value
2424
Seq(
25-
Binding
26-
.builder(configurator.includes("cjson") / "cjson" / "cJSON.h", "cjson")
27-
.withCImports(List("cJSON.h"))
28-
.build,
29-
Binding
30-
.builder(configurator.includes("libuv") / "uv.h", "libuv")
25+
Binding(configurator.includes("cjson") / "cjson" / "cJSON.h", "cjson")
26+
.withCImports(List("cJSON.h")),
27+
Binding(configurator.includes("libuv") / "uv.h", "libuv")
3128
.withCImports(List("uv.h"))
3229
.withClangFlags(
3330
List(
3431
"-I" + configurator.includes("libuv").toString
3532
)
36-
)
37-
.build,
38-
Binding
39-
.builder(configurator.includes("czmq") / "czmq.h", "czmq")
33+
),
34+
Binding(configurator.includes("czmq") / "czmq.h", "czmq")
4035
.withCImports(List("czmq.h"))
4136
.withClangFlags(
4237
List(
4338
"-I" + configurator.includes("czmq").toString,
4439
"-I" + configurator.includes("zeromq").toString
4540
)
4641
)
47-
.build
4842
)
4943
}

example/project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.9.4
1+
sbt.version=1.10.10

example/project/plugins.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
val BindgenVersion =
2-
sys.env.getOrElse("SN_BINDGEN_VERSION", "0.0.16")
2+
sys.env.getOrElse("SN_BINDGEN_VERSION", "0.2.3")
33

44
val VcpkgVersion =
5-
sys.env.getOrElse("SBT_VCPKG_VERSION", "0.0.9")
5+
sys.env.getOrElse("SBT_VCPKG_VERSION", "0.0.21")
66

77
addSbtPlugin("com.indoorvivants" % "bindgen-sbt-plugin" % BindgenVersion)
8-
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7")
8+
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.7")
99
addSbtPlugin("com.indoorvivants.vcpkg" % "sbt-vcpkg-native" % VcpkgVersion)
1010

1111
resolvers += Resolver.sonatypeRepo("snapshots")

example/src/main/scala/Test.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import libuv.types.*
1212
import scalanative.unsigned.*
1313

1414
@main def hello =
15-
Zone { implicit z =>
15+
Zone:
1616
val loop = uv_default_loop()
1717

1818
uv_loop_init(loop)
@@ -41,4 +41,3 @@ import scalanative.unsigned.*
4141
uv_run(loop, uv_run_mode.UV_RUN_DEFAULT)
4242

4343
uv_loop_close(loop)
44-
}

0 commit comments

Comments
 (0)