summaryrefslogtreecommitdiff
path: root/.github/workflows/ant-build.yaml
blob: 0ef7f1b7c3f30ccd45e9d8bc285d366dde20d8b1 (plain)
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
name: YaCy CI/CD Pipeline

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]
  workflow_dispatch:

jobs:
  build-and-test:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0

    - name: Set up JDK 11
      uses: actions/setup-java@v3
      with:
        java-version: '11'
        distribution: 'temurin'

    - name: Install build dependencies
      run: |
        sudo apt-get update
        sudo apt-get install -yq ant git wkhtmltopdf imagemagick xvfb ghostscript

    - name: Build with Ant
      run: |
        ant compile -f build.xml
        git rev-parse HEAD > .git/shallow
        git tag -l | xargs git tag -d
        git gc --prune=now

    - name: Configure runtime settings
      run: |
        sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:8cffbc0d66567a0987a4aba1ec46d63c" defaults/yacy.init
        sed -i "/adminAccountForLocalhost=/c\adminAccountForLocalhost=false" defaults/yacy.init
        sed -i "/server.https=false/c\server.https=true" defaults/yacy.init