From 50ac1f7ba4abf5bdaf1ec5263ce49822b51cc725 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 1 Mar 2024 20:23:18 +0000 Subject: [PATCH] ci: build c.delta.chat docs with nix --- .github/workflows/upload-docs.yml | 41 +++++++++++++++++++- .github/workflows/upload-python-docs.yml | 26 ------------- scripts/README.md | 2 - scripts/concourse/docs_wheels.yml | 49 ------------------------ scripts/run-doxygen.sh | 5 --- 5 files changed, 39 insertions(+), 84 deletions(-) delete mode 100644 .github/workflows/upload-python-docs.yml delete mode 100755 scripts/run-doxygen.sh diff --git a/.github/workflows/upload-docs.yml b/.github/workflows/upload-docs.yml index 4cab238400..f048097b3f 100644 --- a/.github/workflows/upload-docs.yml +++ b/.github/workflows/upload-docs.yml @@ -1,4 +1,4 @@ -name: Build & Deploy Documentation on rs.delta.chat +name: Build & Deploy Documentation on rs.delta.chat, c.delta.chat, py.delta.chat on: push: @@ -6,7 +6,7 @@ on: - main jobs: - build: + build-rs: runs-on: ubuntu-latest steps: @@ -24,3 +24,40 @@ jobs: HOST: "delta.chat" SOURCE: "target/doc" TARGET: "/var/www/html/rs/" + + build-python: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + show-progress: false + fetch-depth: 0 # Fetch history to calculate VCS version number. + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Build Python documentation + run: nix build .#python-docs + - name: Upload to py.delta.chat + run: | + mkdir -p "$HOME/.ssh" + echo "${{ secrets.CODESPEAK_KEY }}" > "$HOME/.ssh/key" + chmod 600 "$HOME/.ssh/key" + rsync -avzh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/result/html/ "delta@py.delta.chat:/home/delta/build/master" + + build-c: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + show-progress: false + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Build C documentation + run: nix build .#docs + - name: Upload to py.delta.chat + run: | + mkdir -p "$HOME/.ssh" + echo "${{ secrets.CODESPEAK_KEY }}" > "$HOME/.ssh/key" + chmod 600 "$HOME/.ssh/key" + rsync -avzh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/result/html/ "delta@c.delta.chat:/home/delta/build-c/master" diff --git a/.github/workflows/upload-python-docs.yml b/.github/workflows/upload-python-docs.yml deleted file mode 100644 index 142eaa3cd9..0000000000 --- a/.github/workflows/upload-python-docs.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Build & Deploy Documentation on py.delta.chat - -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - show-progress: false - fetch-depth: 0 # Fetch history to calculate VCS version number. - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - name: Build Python documentation - run: nix build .#python-docs - - name: Upload to py.delta.chat - run: | - mkdir -p "$HOME/.ssh" - echo "${{ secrets.CODESPEAK_KEY }}" > "$HOME/.ssh/key" - chmod 600 "$HOME/.ssh/key" - rsync -avzh -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/result/html/ "delta@lists.codespeak.net:/home/delta/build/master" diff --git a/scripts/README.md b/scripts/README.md index dab3f20c37..07ba059153 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -31,8 +31,6 @@ and an own build machine. - `remote_tests_rust.sh` rsyncs to the build machine and runs `run-rust-test.sh` remotely on the build machine. -- `run-doxygen.sh` generates C-docs which are then uploaded to https://c.delta.chat/ - - `run_all.sh` builds Python wheels - `android-rpc-server.sh` compiles binaries of `deltachat-rpc-server` using Android NDK. diff --git a/scripts/concourse/docs_wheels.yml b/scripts/concourse/docs_wheels.yml index 66f835d294..73e2d7469b 100644 --- a/scripts/concourse/docs_wheels.yml +++ b/scripts/concourse/docs_wheels.yml @@ -15,55 +15,6 @@ resources: tag_filter: "v*" jobs: - - name: doxygen - plan: - - get: deltachat-core-rust - trigger: true - - # Build Doxygen documentation - - task: build-doxygen - config: - inputs: - - name: deltachat-core-rust - outputs: - - name: c-docs - image_resource: - source: - repository: alpine - type: registry-image - platform: linux - run: - path: sh - args: - - -ec - - | - apk add --no-cache doxygen git - cd deltachat-core-rust - scripts/run-doxygen.sh - cd .. - cp -av deltachat-core-rust/deltachat-ffi/html deltachat-core-rust/deltachat-ffi/xml c-docs/ - - - task: upload-c-docs - config: - inputs: - - name: c-docs - image_resource: - type: registry-image - source: - repository: alpine - platform: linux - run: - path: sh - args: - - -ec - - | - apk add --no-cache rsync openssh-client - mkdir -p ~/.ssh - chmod 700 ~/.ssh - echo "(("c.delta.chat".private_key))" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - rsync -e "ssh -o StrictHostKeyChecking=no" -avz --delete c-docs/html/ delta@c.delta.chat:build-c/master - - name: python-x86_64 plan: - get: deltachat-core-rust diff --git a/scripts/run-doxygen.sh b/scripts/run-doxygen.sh deleted file mode 100755 index 1825149eb8..0000000000 --- a/scripts/run-doxygen.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -set -e - -cd deltachat-ffi -PROJECT_NUMBER=$(git log -1 --format="%h (%cd)") doxygen