-
Notifications
You must be signed in to change notification settings - Fork 6
117 lines (103 loc) · 3.8 KB
/
build.yml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Continuous Integration
on:
pull_request:
push:
branches:
- main
- "releases/*"
permissions:
pages: write
id-token: write
pull-requests: write
jobs:
build-lint-test:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: windows-latest
checkTarget: true
- os: ubuntu-latest
docsTarget: true
# Code coverage doesn't seem to work when PR's are opened from forked repositories, see discussion:
#
# >>> https://delta-users.slack.com/archives/C06P467JMBK/p1727730777683979?thread_ts=1727643486.229189&cid=C06P467JMBK
#
coverageTarget: false
cloudTestTarget: true
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: false
- name: Checkout specific delta-kernel-rs release
shell: bash
run: chmod -R +x .scripts/*.sh && .scripts/checkout-delta-kernel-rs.sh
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: src/DeltaLake/Bridge
- name: Setup .NET
uses: actions/setup-dotnet@v3
- name: Build
# We intentionally just build debug mode in this CI. We build before
# regen to confirm no interop header changes.
run: dotnet build
- name: Regen confirm unchanged
if: ${{ matrix.checkTarget }}
# Needs to be 16.0.0 until https://github.com/dotnet/ClangSharp/pull/506 released
run: |
dotnet tool install --global --version 16.0.0 ClangSharpPInvokeGenerator
# ClangSharpPInvokeGenerator @src/DeltaLake/Bridge/GenerateInterop.rsp
npx doctoc README.md
git config --global core.safecrlf false
git diff --exit-code
- name: Check format
if: ${{ matrix.checkTarget }}
run: dotnet format --verify-no-changes
- name: Test
env:
RUST_BACKTRACE: 1
# increased stack size currently necessary for osx
DOTNET_DefaultStackSize: "180000"
run: dotnet test -c Release /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=./lcov.info --logger "console;verbosity=detailed" --blame-crash -v n
- name: Upload test failure
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-fail-${{ matrix.os }}
path: tests/DeltaLake.Tests/TestResults
- name: Setup LCOV
if: github.event_name == 'pull_request' && matrix.coverageTarget
uses: hrishikesh-kadam/setup-lcov@v1
- name: Report code coverage
if: github.event_name == 'pull_request' && matrix.coverageTarget
uses: zgosalvez/github-actions-report-lcov@v3
with:
coverage-files: tests/DeltaLake.Tests/lcov.info
minimum-coverage: 80
artifact-name: code-coverage-report
github-token: ${{ secrets.GITHUB_TOKEN }}
#working-directory: apps/my-first-app
update-comment: true
- name: Build docs
if: ${{ matrix.docsTarget }}
run: |
dotnet tool update -g docfx
docfx src/DeltaLake.ApiDoc/docfx.json --warningsAsErrors
- name: Upload artifact
if: ${{ github.ref == 'refs/heads/main' && matrix.docsTarget }}
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: "src/DeltaLake.ApiDoc/_site"
- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' && matrix.docsTarget }}
id: deployment
uses: actions/deploy-pages@v4