-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (77 loc) · 2.7 KB
/
Copy pathci.yml
File metadata and controls
83 lines (77 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
# Cancel in-progress runs when a new commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
# Toolchain release used to run the test suite. Pinned rather than tracking
# `latest` so a failed release (which publishes an asset-less tag) cannot
# turn every PR red. Bump after a release publishes its artifacts.
FUSE_TOOLCHAIN_VERSION: v0.4.1
jobs:
format:
name: Check Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: coursier/setup-action@v2
with:
apps: scalafmt
- name: Check scalafmt
run: scalafmt --check .
test:
name: Tests
runs-on: ubuntu-latest
needs: format
steps:
- uses: actions/checkout@v6
- uses: coursier/cache-action@v6
- uses: coursier/setup-action@v2
with:
jvm: temurin:17
apps: sbt
- name: Run tests with coverage
run: |
# Install with the checked-out fuseup so installer changes are exercised
# by the PR that makes them, not only after they deploy to gh-pages.
sh gh-pages/fuseup -y --no-modify-path --version "$FUSE_TOOLCHAIN_VERSION"
. ~/.local/share/fuse/env
export FUSE_RUNTIME="$GITHUB_WORKSPACE/grin"
export FUSE_STDLIB="$GITHUB_WORKSPACE/stdlib"
sbt clean coverage fuse/test fuse/coverageReport
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./.jvm/target/scala-3.6.4/scoverage-report/scoverage.xml
fail_ci_if_error: false
native:
name: Native Link
runs-on: ubuntu-latest
needs: format
env:
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M
steps:
- uses: actions/checkout@v6
- uses: coursier/cache-action@v6
- uses: coursier/setup-action@v2
with:
jvm: temurin:17
apps: sbt
# The release tarball is built from this binary. Its name is set by Scala
# Native, so a version bump can move it without breaking any test — which
# is how the v0.4.0 release broke. Assert the release script still finds it.
- name: Verify release binary lookup
run: |
sbt fuseNative/nativeLink
fuse_bin=$(find .native/target -maxdepth 2 -name "fuse" -type f | head -1)
if [ -z "$fuse_bin" ]; then
echo "::error::native binary not found where scripts/build-toolchain.sh expects it"
find .native/target -maxdepth 2 -type f
exit 1
fi
echo "found $fuse_bin"