From 350dbcd28f1d9fad8dde8d0b1094f182f8c02890 Mon Sep 17 00:00:00 2001 From: KtorZ Date: Fri, 4 Aug 2023 00:38:06 +0200 Subject: [PATCH] Disable legacy continuous integration workflow. --- .github/workflows/Package.cabal | 9 - .github/workflows/continuous-integration.yaml | 254 ------------------ .../workflows/network-synchronization.yaml | 40 --- .github/workflows/package.yaml | 147 ---------- .github/workflows/user-guide.yaml | 49 ---- 5 files changed, 499 deletions(-) delete mode 100644 .github/workflows/Package.cabal delete mode 100644 .github/workflows/continuous-integration.yaml delete mode 100644 .github/workflows/network-synchronization.yaml delete mode 100644 .github/workflows/package.yaml delete mode 100644 .github/workflows/user-guide.yaml diff --git a/.github/workflows/Package.cabal b/.github/workflows/Package.cabal deleted file mode 100644 index d3b4e4cc0b..0000000000 --- a/.github/workflows/Package.cabal +++ /dev/null @@ -1,9 +0,0 @@ -cabal-version: 1.12 - --- This file has been generated from package.yaml by hpack version 0.35.0. --- --- see: https://github.com/sol/hpack - -name: Package -version: 0.0.0 -build-type: Simple diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml deleted file mode 100644 index 5920a02ec5..0000000000 --- a/.github/workflows/continuous-integration.yaml +++ /dev/null @@ -1,254 +0,0 @@ -name: Continuous Integration - -on: - pull_request: - branches: [ "master" ] - push: - branches: [ "master" ] - tags: [ "*.*.*" ] - -jobs: - # _______ _______ ______ __ __ _______ ______ - # | || || _ | | | | || || _ | - # | _____|| ___|| | || | |_| || ___|| | || - # | |_____ | |___ | |_||_ | || |___ | |_||_ - # |_____ || ___|| __ || || ___|| __ | - # _____| || |___ | | | | | | | |___ | | | | - # |_______||_______||___| |_| |___| |_______||___| |_| - # - server_build: - strategy: - matrix: - os: [ubuntu-20.04] - - runs-on: ${{ matrix.os }} - steps: - - name: 📥 Checkout repository - uses: actions/checkout@v2.3.3 - with: - submodules: true - - - name: ❄️ Install Nix - uses: cachix/install-nix-action@v13 - with: - extra_nix_config: | - trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= - substituters = https://cache.iog.io https://cache.nixos.org/ - - - name: 💾 Cache Build - uses: cachix/cachix-action@v10 - with: - name: cardano-ogmios - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - - name: 🔨 Build - shell: bash - run: | - nix-build -A platform.amd64 -o dist - cp dist/bin/ogmios server/ogmios - - - name: 📤 Upload binary - uses: actions/upload-artifact@v2 - with: - name: ogmios - path: | - server/ogmios - - # _______ _______ ______ __ __ _______ ______ ___ ___ __ _ _______ - # | || || _ | | | | || || _ | | | | | | | | || | - # | _____|| ___|| | || | |_| || ___|| | || | | | | | |_| ||_ _| - # | |_____ | |___ | |_||_ | || |___ | |_||_ | | | | | | | | - # |_____ || ___|| __ || || ___|| __ | | |___ | | | _ | | | - # _____| || |___ | | | | | | | |___ | | | | _____ | || | | | | | | | - # |_______||_______||___| |_| |___| |_______||___| |_||_____| |_______||___| |_| |__| |___| - # - server_lint: - strategy: - matrix: - os: [ubuntu-20.04] - runs-on: ${{ matrix.os }} - steps: - - name: 📥 Checkout repository - uses: actions/checkout@v2.3.3 - with: - submodules: true - - - name: 🔬 hlint - working-directory: server - shell: bash - env: - PACKAGE: hlint - REPOSITORY: ndmitchell/hlint - PLATFORM: x86_64-linux - RELEASE: v3.2 - VERSION: 3.2 - run: | - curl -sSL https://raw.github.com/cardanosolutions/ogmios/master/scripts/exec-from-github.sh | sh -s src test app -h .hlint.yaml - - - name: 🧐 stylish-haskell - working-directory: server - shell: bash - env: - PACKAGE: stylish-haskell - REPOSITORY: jaspervdj/stylish-haskell - PLATFORM: linux-x86_64 - RELEASE: v0.13.0.0 - VERSION: v0.13.0.0 - run: | - curl -sSL https://raw.github.com/cardanosolutions/ogmios/master/scripts/exec-from-github.sh | sh -s $(find src test app -type f -name '*.hs' ! -path '*.stack-work*') -i -c .stylish-haskell.yaml - if [ -z "$(git status --porcelain)" ]; then - echo "No style errors detected." - else - echo "Style errors detected:" - git diff - exit 1 - fi - - # _______ ___ ___ _______ __ _ _______ _______ _______ __ __ _______ _______ _______ _______ ______ ___ _______ _______ - # | || | | | | || | | || || | | || | | || || || || || _ | | | | || | - # | || | | | | ___|| |_| ||_ _|| _____| |_ _|| |_| || _ || ___|| _____|| || | || | | | _ ||_ _| - # | || | | | | |___ | | | | | |_____ | | | || |_| || |___ | |_____ | || |_||_ | | | |_| | | | - # | _|| |___ | | | ___|| _ | | | |_____ | | | |_ _|| ___|| ___||_____ || _|| __ || | | ___| | | - # | |_ | || | | |___ | | | | | | _____| | _____ | | | | | | | |___ _____| || |_ | | | || | | | | | - # |_______||_______||___| |_______||_| |__| |___| |_______||_____| |___| |___| |___| |_______||_______||_______||___| |_||___| |___| |___| - # - clients_TypeScript: - needs: [server_build] - strategy: - matrix: - os: [ubuntu-20.04] - network: [testnet] - cardanoNodeVersion: [1.35.2] - - runs-on: ${{ matrix.os }} - steps: - - name: 📥 Checkout repository - uses: actions/checkout@v2.3.3 - with: - submodules: true - - - name: ⌚ Get Date/Time - id: date-time - shell: bash - run: | - echo "::set-output name=value::$(/bin/date -u "+%Y%m%d-%H%M%S")" - - - name: 🧰 Setup Node.js - uses: actions/setup-node@v1 - with: - node-version: 14.15.0 - - - name: 🔨 Build - working-directory: clients/TypeScript - run: | - yarn install --frozen-lockfile --non-interactive --logevel=error - yarn build - yarn lint - - - name: 📥 Download - uses: actions/download-artifact@v2 - with: - name: ogmios - path: server - - - name: 💾 Cache cardano-node DB - id: cache - uses: actions/cache@v2.1.1 - with: - path: ${{ runner.temp }}/db-${{ matrix.network }} - key: cardano-node-ogmios-${{ matrix.network }}-${{ steps.date-time.outputs.value }} - restore-keys: | - cardano-node-ogmios-${{ matrix.network }}- - - - name: 🔬 Test - if: matrix.network == 'testnet' - working-directory: clients/TypeScript - shell: bash - env: - CONFDIR: /home/runner/work/ogmios/ogmios/server/config/network/${{ matrix.network }} - run: | - chmod +x ../../server/ogmios - sudo ../../server/ogmios --port 1338 --log-level error --node-socket ${{ runner.temp }}/ipc/node.socket --node-config $CONFDIR/cardano-node/config.json & - - docker pull inputoutput/cardano-node:${{ matrix.cardanoNodeVersion }} - docker run -d --name cardano-node \ - -v ${{ runner.temp }}/db-${{ matrix.network }}:/db \ - -v ${{ runner.temp }}/ipc:/ipc \ - -v $CONFDIR/cardano-node:/config \ - -v $CONFDIR/genesis:/genesis \ - inputoutput/cardano-node:${{ matrix.cardanoNodeVersion }} run --config /config/config.json --database-path /db --socket-path /ipc/node.socket --topology /config/topology.json - - ../../scripts/wait-for-sync.sh 1338 1 - - yarn test - docker stop cardano-node - docker rm cardano-node - - clients_TypeScript_repl: - if: ${{ github.event_name == 'push' }} - runs-on: ${{ matrix.os }} - needs: [clients_TypeScript] - strategy: - matrix: - os: [ubuntu-20.04] - target: [linux,macos,win.exe] - steps: - - name: 📥 Checkout repository - uses: actions/checkout@v2.3.3 - - - name: 🧰 Setup Node.js - uses: actions/setup-node@v1 - with: - node-version: 14.15.0 - - - name: 📦 Package REPL - working-directory: clients/TypeScript - run: | - yarn install --frozen-lockfile --non-interactive --logevel=error - yarn repl:pkg - - - name: 📤 Upload REPL exe - uses: actions/upload-artifact@v2 - with: - name: cardano-ogmios-repl-${{ matrix.target }}-${{ github.sha }} - path: clients/TypeScript/packages/repl/build/cardano-ogmios-repl-${{ matrix.target }} - - clients_TypeScript_npm: - if: ${{ github.event_name == 'push' }} - runs-on: ${{ matrix.os }} - needs: [clients_TypeScript] - strategy: - matrix: - os: [ubuntu-20.04] - package: [schema,client,repl] - steps: - - name: 📥 Checkout repository - uses: actions/checkout@v2.3.3 - - - name: 🧰 Setup Node.js - uses: actions/setup-node@v1 - with: - node-version: 14.15.0 - - - name: 📦 Pack - working-directory: clients/TypeScript - run: | - yarn install --frozen-lockfile --non-interactive --logevel=error - ./scripts/pack.sh - - - name: 📤 Upload npm packages - uses: actions/upload-artifact@v2 - with: - name: cardano-ogmios-clients-ts-packages - path: | - clients/TypeScript/cardano-ogmios-client-${{ github.sha }}.tgz - clients/TypeScript/cardano-ogmios-schema-${{ github.sha }}.tgz - clients/TypeScript/cardano-ogmios-repl-${{ github.sha }}.tgz - - - name: 📤 Publish client package to npm registry - if: ${{ startsWith(github.ref, 'refs/tags') }} - uses: JS-DevTools/npm-publish@v1 - with: - check-version: true - package: clients/TypeScript/packages/${{ matrix.package }}/package.json - token: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/network-synchronization.yaml b/.github/workflows/network-synchronization.yaml deleted file mode 100644 index 3f35d1eefe..0000000000 --- a/.github/workflows/network-synchronization.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: Network Synchronization - -on: - schedule: - - cron: '00 06,18 * * *' - workflow_dispatch: - -jobs: - sync_and_cache: - strategy: - matrix: - network: [ testnet ] - - runs-on: ubuntu-latest - steps: - - - name: 📥 Checkout repository - uses: actions/checkout@v2.3.3 - - - name: ⌚ Get Date/Time - id: date-time - shell: bash - run: | - echo "::set-output name=value::$(/bin/date -u "+%Y%m%d-%H%M%S")" - - - name: 💾 Cache cardano-node DB - id: cache - uses: actions/cache@v2.1.1 - with: - path: ${{ runner.temp }}/db-${{ matrix.network }} - key: cardano-node-ogmios-${{ matrix.network }}-${{ steps.date-time.outputs.value }} - restore-keys: | - cardano-node-ogmios-${{ matrix.network }}- - - - name: ⟲ Sync Node - uses: CardanoSolutions/gh-action-cardano-node-ogmios-docker-sync@v1.0.1 - with: - db-dir: ${{ runner.temp }}/db-${{ matrix.network }} - network: ${{ matrix.network }} - version: v5.5.4_1.35.2 diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml deleted file mode 100644 index b28d115106..0000000000 --- a/.github/workflows/package.yaml +++ /dev/null @@ -1,147 +0,0 @@ -name: Package - -on: - push: - branches: [ "minor/v5.6.0" ] - -jobs: - nix: - strategy: - matrix: - arch: [amd64] - - runs-on: ubuntu-latest - steps: - - - name: 📥 Checkout repository - uses: actions/checkout@v2.3.3 - with: - submodules: true - - - name: ❄️ Install Nix - uses: cachix/install-nix-action@v20 - with: - extra_nix_config: | - trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= - substituters = https://hydra.iohk.io https://cache.nixos.org/ - - - name: 💾 Cache Build - uses: cachix/cachix-action@v12 - with: - name: cardano-ogmios - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - - name: 🔨 Build - run: | - nix-build -A platform.${{ matrix.arch }} -o dist - cp -r dist/* . && mkdir -p share && chmod +w share - mkdir -p share/zsh/site-functions && ./bin/ogmios --zsh-completion-script ogmios > share/zsh/site-functions/_ogmios - mkdir -p share/bash-completion/completions && ./bin/ogmios --bash-completion-script ogmios > share/bash-completion/completions/ogmios - chmod -w share - - - name: 📎 Upload Artifact - uses: actions/upload-artifact@v2 - with: - name: ogmios-${{ matrix.arch }}-linux - path: | - bin - share - - docker: - needs: [nix] - strategy: - matrix: - os: [ ubuntu-20.04 ] - target: [ ogmios, cardano-node-ogmios ] - network: [ "mainnet", "preprod", "preview" ] - cardano_node_version: [ "1.35.7" ] - - runs-on: ${{ matrix.os }} - steps: - - name: 📥 Checkout repository - uses: actions/checkout@v2.3.3 - with: - submodules: true - - - name: 🧰 Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: 🧐 hadolint - uses: brpaz/hadolint-action@v1.5.0 - with: - dockerfile: "./Dockerfile" - failure-threshold: warning - ignore: DL3029 DL3059 - - - name: 🐳 Login to DockerHub - if: ${{ github.event_name == 'push' }} - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} - - - name: 📝 Base Variables - id: base-variables - run: | - echo ::set-output name=image::cardanosolutions/${{ matrix.target }} - - - name: 📝 Tag Variables - if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }} - id: tag-variables - run: | - echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} - - - name: 🔨 Build and push (default latest) - if: ${{ github.event_name == 'push' && matrix.network == 'mainnet' }} - uses: docker/build-push-action@v2 - with: - build-args: | - NETWORK=${{ matrix.network }} - context: . - push: true - tags: ${{ steps.base-variables.outputs.image }}:latest - target: ${{ matrix.target }} - platforms: linux/amd64 - cache-from: type=registry,ref=${{ steps.base-variables.outputs.image }}:latest - cache-to: type=inline - - - name: 🔨 Build and push (network latest) - if: ${{ github.event_name == 'push' }} - uses: docker/build-push-action@v2 - with: - build-args: | - NETWORK=${{ matrix.network }} - context: . - push: true - tags: ${{ steps.base-variables.outputs.image }}:latest-${{ matrix.network }} - target: ${{ matrix.target }} - platforms: linux/amd64 - cache-from: type=registry,ref=${{ steps.base-variables.outputs.image }}:latest-${{ matrix.network }} - cache-to: type=inline - - - name: 🏷️ Build and push (default tag) - if: ${{ github.event_name == 'push' && matrix.network == 'mainnet' && matrix.target == 'cardano-node-ogmios' }} - uses: docker/build-push-action@v2 - with: - build-args: | - NETWORK=${{ matrix.network }} - context: . - push: true - tags: ${{ steps.base-variables.outputs.image }}:v5.6.0_${{ matrix.cardano_node_version }} - target: ${{ matrix.target }} - cache-from: type=registry,ref=${{ steps.base-variables.outputs.image }}:latest - cache-to: type=inline - - - name: 🏷️ Build and push (network tags) - if: ${{ github.event_name == 'push' && matrix.target == 'cardano-node-ogmios' }} - uses: docker/build-push-action@v2 - with: - build-args: | - NETWORK=${{ matrix.network }} - CARDANO_NODE_VERSION=${{ matrix.cardano_node_version }} - context: . - push: true - tags: ${{ steps.base-variables.outputs.image }}:v5.6.0_${{ matrix.cardano_node_version }}-${{ matrix.network }} - target: ${{ matrix.target }} - cache-from: type=registry,ref=${{ steps.base-variables.outputs.image }}:latest-${{ matrix.network }} - cache-to: type=inline diff --git a/.github/workflows/user-guide.yaml b/.github/workflows/user-guide.yaml deleted file mode 100644 index d5b71e62e6..0000000000 --- a/.github/workflows/user-guide.yaml +++ /dev/null @@ -1,49 +0,0 @@ -name: User Guide - -on: - push: { "branches": [ "master" ] } - pull_request: { "branches": [ "master" ] } - -jobs: - build: - strategy: - matrix: - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - steps: - - - name: 📥 Checkout repository - uses: actions/checkout@v2.3.3 - with: - submodules: true - - - name: 🧰 Setup Node.js - uses: actions/setup-node@v1 - with: - node-version: 14.15.0 - - - name: 🧰 Download Hugo - run: | - curl -L https://github.com/gohugoio/hugo/releases/download/v0.76.5/hugo_extended_0.76.5_Linux-64bit.tar.gz | tar xz - - - name: 🔨 Build TypeScript Doc - working-directory: clients/TypeScript - run: | - yarn install --frozen-lockfile --non-interactive --logevel=error - yarn build - yarn docs - - - name: 📸 Build Static Website - shell: bash - working-directory: docs - run: | - ../hugo -t learn --minify - echo "ogmios.dev" > public/CNAME - - - name: 📘 Publish Artifacts - if: matrix.os == 'ubuntu-latest' && github.event_name == 'push' - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/public - enable_jekyll: false