Skip to content

Commit

Permalink
Merge branch 'publish-versioned-docs-fork'
Browse files Browse the repository at this point in the history
  • Loading branch information
ffakenz committed Mar 27, 2023
2 parents 0f4775d + c5d1621 commit 925f4e6
Show file tree
Hide file tree
Showing 126 changed files with 19,019 additions and 206 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/check-docs.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/ci-haddock.sh

This file was deleted.

237 changes: 119 additions & 118 deletions .github/workflows/ci.yaml
Expand Up @@ -8,7 +8,7 @@ concurrency:
on:
push:
branches:
- pepe
- master
pull_request:
schedule:
# Everyday at 4:00 AM
Expand All @@ -23,14 +23,15 @@ jobs:
include:
- package: plutus-cbor
- package: plutus-merkle-tree
# - package: hydra-tui
# - package: hydra-node
# - package: hydra-cluster
- package: hydra-plutus
- package: hydra-tui
- package: hydra-node
- package: hydra-cluster
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3
with:
repository: ffakenz/hydra-poc
repository: input-output-hk/hydra
token: ${{ secrets.MY_TOKEN || github.token }}
# On pull_request events, we want to check out the latest commit of the
# PR, which is different to github.ref (the default, which would point
Expand Down Expand Up @@ -86,7 +87,7 @@ jobs:
env:
TERM: "xterm"
# TUI specs are flaky. They are failing because of SIGSEGV.
# There is an open issue to tackle this problem. https://github.com/ffakenz/hydra-poc/issues/590
# There is an open issue to tackle this problem. https://github.com/input-output-hk/hydra/issues/590
continue-on-error: true
run: |
nix develop .#ci --command bash -c 'cabal test ${{ matrix.package }}'
Expand All @@ -99,69 +100,69 @@ jobs:
./**/test-results.xml
./**/hspec-results.md
# build-executables:
# name: "Build using nix"
# runs-on: ubuntu-latest
# steps:
# - name: 📥 Checkout repository
# uses: actions/checkout@v3
# with:
# repository: ffakenz/hydra-poc
# token: ${{ secrets.MY_TOKEN || github.token }}
# # On pull_request events, we want to check out the latest commit of the
# # PR, which is different to github.ref (the default, which would point
# # to a "fake merge" commit). On push events, the default is fine as it
# # refers to the pushed commit.
# ref: ${{ github.event.pull_request.head.sha || github.ref }}
# # Also ensure we have all history with all tags
# fetch-depth: 0

# - name: ❄ Prepare nix
# uses: cachix/install-nix-action@v20
# with:
# extra_nix_config: |
# accept-flake-config = true

# - name: ❄ Cachix cache of nix derivations
# uses: cachix/cachix-action@v12
# with:
# name: hydra-node
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

# - name: ❄ Build static executables
# run: |
# mkdir -p bin/
# nix build .#hydra-node-static && cp result/bin/* bin/
# nix build .#hydra-tools-static && cp result/bin/* bin/
# nix build .#hydra-tui-static && cp result/bin/* bin/

# - name: 💾 Upload executables
# uses: actions/upload-artifact@v3
# with:
# name: hydra-x86_64-unknown-linux-musl
# path: |
# ./bin

# publish-test-results:
# name: Publish test results
# needs: [build-test]
# runs-on: ubuntu-latest
# steps:
# - name: 📥 Checkout repository
# uses: actions/checkout@v3
# with:
# repository: ffakenz/hydra-poc
# token: ${{ secrets.MY_TOKEN || github.token }}

# - name: 📥 Download test results
# uses: actions/download-artifact@v3
# with:
# name: test-results

# - name: ✏ Publish test results to PR
# uses: EnricoMi/publish-unit-test-result-action@v2
# with:
# junit_files: ./**/test-results.xml
build-executables:
name: "Build using nix"
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3
with:
repository: input-output-hk/hydra
token: ${{ secrets.MY_TOKEN || github.token }}
# On pull_request events, we want to check out the latest commit of the
# PR, which is different to github.ref (the default, which would point
# to a "fake merge" commit). On push events, the default is fine as it
# refers to the pushed commit.
ref: ${{ github.event.pull_request.head.sha || github.ref }}
# Also ensure we have all history with all tags
fetch-depth: 0

- name: ❄ Prepare nix
uses: cachix/install-nix-action@v20
with:
extra_nix_config: |
accept-flake-config = true
- name: ❄ Cachix cache of nix derivations
uses: cachix/cachix-action@v12
with:
name: hydra-node
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: ❄ Build static executables
run: |
mkdir -p bin/
nix build .#hydra-node-static && cp result/bin/* bin/
nix build .#hydra-tools-static && cp result/bin/* bin/
nix build .#hydra-tui-static && cp result/bin/* bin/
- name: 💾 Upload executables
uses: actions/upload-artifact@v3
with:
name: hydra-x86_64-unknown-linux-musl
path: |
./bin
publish-test-results:
name: Publish test results
needs: [build-test]
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3
with:
repository: input-output-hk/hydra
token: ${{ secrets.MY_TOKEN || github.token }}

- name: 📥 Download test results
uses: actions/download-artifact@v3
with:
name: test-results

- name: ✏ Publish test results to PR
uses: EnricoMi/publish-unit-test-result-action@v2
with:
junit_files: ./**/test-results.xml

haddock-benchmarks:
name: "Haddock & benchmarks"
Expand All @@ -171,15 +172,15 @@ jobs:
include:
- bench: tx-cost
options: '--output-directory $(pwd)/docs/benchmarks'
# - bench: hydra-cluster
# options: '--scaling-factor 1'
- bench: hydra-cluster
options: '--scaling-factor 1'
- bench: plutus-merkle-tree
options: '$(pwd)/docs/benchmarks'
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3
with:
repository: ffakenz/hydra-poc
repository: input-output-hk/hydra
token: ${{ secrets.MY_TOKEN || github.token }}

- name: ❄ Prepare nix
Expand Down Expand Up @@ -222,51 +223,51 @@ jobs:
name: benchmarks-and-haddocks
path: ./docs

# publish-benchmark-results:
# name: Publish benchmark results
# if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
# # TODO: this is actually only requires the tx-cost benchmark results
# needs: [haddock-benchmarks]
# runs-on: ubuntu-latest
# steps:
# - name: 📥 Checkout repository
# uses: actions/checkout@v3
# with:
# repository: ffakenz/hydra-poc
# token: ${{ secrets.MY_TOKEN || github.token }}

# - name: 📥 Download generated documentation
# uses: actions/download-artifact@v3
# with:
# name: benchmarks-and-haddocks
# path: artifact

# - name: ⚙ Prepare comment body
# id: comment-body
# run: |
# # Drop first 5 header lines and demote headlines one level
# body="$(cat artifact/benchmarks/transaction-cost.md | sed '1,5d;s/^#/##/')"
# body="${body//'%'/'%25'}"
# body="${body//$'\n'/'%0A'}"
# body="${body//$'\r'/'%0D'}"
# echo "::set-output name=body::$body"

# - name: 🔎 Find Comment
# uses: peter-evans/find-comment@v2
# id: find-comment
# with:
# issue-number: ${{ github.event.pull_request.number }}
# comment-author: 'github-actions[bot]'
# body-includes: Transactions Costs

# - name: ✏ Create or update comment
# uses: peter-evans/create-or-update-comment@v2
# with:
# comment-id: ${{ steps.find-comment.outputs.comment-id }}
# edit-mode: replace
# issue-number: ${{ github.event.pull_request.number }}
# body: ${{ steps.comment-body.outputs.body }}
# reactions: rocket
publish-benchmark-results:
name: Publish benchmark results
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
# TODO: this is actually only requires the tx-cost benchmark results
needs: [haddock-benchmarks]
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3
with:
repository: input-output-hk/hydra
token: ${{ secrets.MY_TOKEN || github.token }}

- name: 📥 Download generated documentation
uses: actions/download-artifact@v3
with:
name: benchmarks-and-haddocks
path: artifact

- name: ⚙ Prepare comment body
id: comment-body
run: |
# Drop first 5 header lines and demote headlines one level
body="$(cat artifact/benchmarks/transaction-cost.md | sed '1,5d;s/^#/##/')"
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo "::set-output name=body::$body"
- name: 🔎 Find Comment
uses: peter-evans/find-comment@v2
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Transactions Costs

- name: ✏ Create or update comment
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
edit-mode: replace
issue-number: ${{ github.event.pull_request.number }}
body: ${{ steps.comment-body.outputs.body }}
reactions: rocket

documentation:
name: Documentation
Expand All @@ -276,7 +277,7 @@ jobs:
- name: 📥 Checkout repository
uses: actions/checkout@v3
with:
repository: ffakenz/hydra-poc
repository: input-output-hk/hydra
token: ${{ secrets.MY_TOKEN || github.token }}
# Ensure we have all history with all commits
fetch-depth: 0
Expand Down

0 comments on commit 925f4e6

Please sign in to comment.