• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Build
2
3on:
4  push:
5    branches-ignore:
6      - main
7    tags-ignore:
8      - '**'
9  pull_request:
10
11env:
12  GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
13
14jobs:
15  jvm:
16    strategy:
17      matrix:
18        os:
19          - macos-latest
20          - ubuntu-latest
21          - windows-latest
22
23    runs-on: ${{ matrix.os }}
24
25    steps:
26      - name: Checkout
27        uses: actions/checkout@v4
28
29      - name: Configure JDK
30        uses: actions/setup-java@v4
31        with:
32          distribution: 'zulu'
33          java-version: 19
34
35      - name: Full build
36        if: matrix.os == 'ubuntu-latest'
37        run: ./gradlew build
38
39      - name: KotlinPoet check
40        if: "matrix.os != 'ubuntu-latest'"
41        run: ./gradlew :kotlinpoet:check
42
43  build-docs:
44    runs-on: ubuntu-latest
45    if: github.repository == 'square/kotlinpoet'
46
47    steps:
48      - name: Checkout
49        uses: actions/checkout@v4
50
51      - name: Configure JDK
52        uses: actions/setup-java@v4
53        with:
54          distribution: 'zulu'
55          java-version: 19
56
57      - name: Prep docs
58        run: ./gradlew dokkaHtml
59
60      - name: Set up Python
61        uses: actions/setup-python@v5
62        with:
63          python-version: 3.8
64
65      - name: Build mkdocs
66        run: |
67          pip3 install -r .github/workflows/mkdocs-requirements.txt
68          mkdocs build
69