Skip to content

Commit 4f266d7

Browse files
author
Kadena Kadena
committed
Update CI
- use kda-community - disable cabal-cache
1 parent b0f3535 commit 4f266d7

File tree

4 files changed

+121
-164
lines changed

4 files changed

+121
-164
lines changed

.github/workflows/applications.yml

Lines changed: 104 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Build and publish application binaries
22

3+
permissions:
4+
contents: read
5+
packages: write
6+
attestations: write
7+
id-token: write
8+
39
on:
410
workflow_dispatch:
511
inputs:
@@ -24,11 +30,11 @@ on:
2430
- 'gh-readonly-queue/**'
2531

2632
env:
27-
AWS_ACCESS_KEY_ID: ${{ secrets.kadena_cabal_cache_aws_access_key_id }}
28-
AWS_SECRET_ACCESS_KEY: ${{ secrets.kadena_cabal_cache_aws_secret_access_key }}
33+
AWS_ACCESS_KEY_ID: ${{ secrets.kda_community_cabal_cache_aws_access_key_id }}
34+
AWS_SECRET_ACCESS_KEY: ${{ secrets.kda_community_cabal_cache_aws_secret_access_key }}
2935
AWS_DEFAULT_REGION: us-east-1
3036

31-
S3_ARTIFACT_BUCKET: kadena-cabal-cache
37+
S3_ARTIFACT_BUCKET: community-kda-cabal-cache
3238
S3_ARTIFACT_FOLDER: chainweb-node
3339

3440
USE_CABAL_CACHE: true
@@ -192,29 +198,6 @@ jobs:
192198
echo "config.outputs.matrix=${{ steps.set-matrix.outputs.matrix }}"
193199
echo "::endgroup::"
194200
195-
# ########################################################################## #
196-
# Download Development Database for Testing
197-
#
198-
# Uploading artifacts is slow, but downloading is fast.
199-
# For the development database that pays off.
200-
201-
sync-chain-db:
202-
name: Download test chain database
203-
needs: [config]
204-
runs-on: 'ubuntu-latest'
205-
strategy:
206-
fail-fast: false
207-
env:
208-
DB_SNAPSHOT_URI: 's3://chainweb-chain-db/${{ needs.config.outputs.chainweb-network-version }}/pipeline-db/rocksDb'
209-
steps:
210-
- name: Sync chain database from S3
211-
run: aws s3 sync "$DB_SNAPSHOT_URI" db/0/rocksDb --delete --exclude=LOCK
212-
- name: Store chain database as artifact
213-
uses: actions/upload-artifact@v4
214-
with:
215-
name: chain-db-${{ needs.config.outputs.chainweb-network-version }}
216-
path: db
217-
218201
# ########################################################################## #
219202
# Build and Upload Artifacts
220203

@@ -349,12 +332,12 @@ jobs:
349332
if: env.USE_CABAL_CACHE == 'true'
350333
uses: larskuhtz/cabal-cache-action@4b537195b33898fcd9adc62cee2a44986fd7b1b6
351334
with:
352-
bucket: "kadena-cabal-cache"
335+
bucket: "community-kda-cabal-cache"
353336
region: "us-east-1"
354337
folder: "packages/${{ matrix.os }}"
355338
store_path: ${{ steps.setup.outputs.cabal-store }}
356-
aws_access_key_id: "${{ secrets.kadena_cabal_cache_aws_access_key_id }}"
357-
aws_secret_access_key: "${{ secrets.kadena_cabal_cache_aws_secret_access_key }}"
339+
aws_access_key_id: "${{ secrets.kda_community_cabal_cache_aws_access_key_id }}"
340+
aws_secret_access_key: "${{ secrets.kda_community_cabal_cache_aws_secret_access_key }}"
358341
- name: Install build dependencies
359342
run: cabal build chainweb --only-dependencies
360343
- name: Build chainweb library
@@ -561,7 +544,7 @@ jobs:
561544
runs-on: ${{ matrix.os }}
562545
env:
563546
BENCH_FILE: results.${{ github.run_id }}.${{ github.run_number }}.json
564-
BENCH_BUCKET: kadena-cabal-cache
547+
BENCH_BUCKET: community-kda-cabal-cache
565548
BENCH_FOLDER: chainweb-benchmark-results/${{ matrix.ghc }}/${{ matrix.os }}
566549
ARTIFACTS_NAME: chainweb-applications.${{ matrix.use-freeze-file }}.${{ matrix.ghc }}.${{ matrix.os }}
567550
steps:
@@ -582,97 +565,98 @@ jobs:
582565
run: bench --json $BENCH_FILE +RTS -N
583566
- name: Upload results
584567
run: |
585-
aws s3 cp $BENCH_FILE s3://$BENCH_BUCKET/$BENCH_FOLDER/
586-
aws s3api put-object-acl --bucket $BENCH_BUCKET --key=$BENCH_FOLDER/$BENCH_FILE --acl public-read
568+
echo "Not uploading results"
569+
# aws s3 cp $BENCH_FILE s3://$BENCH_BUCKET/$BENCH_FOLDER/
570+
# aws s3api put-object-acl --bucket $BENCH_BUCKET --key=$BENCH_FOLDER/$BENCH_FILE --acl public-read
587571
588572
# ########################################################################## #
589573
# Validate Devnet Database and Replay Pact History
590574

591-
validate-devnet-database:
592-
name: Validate Devnet Database Snapshot and Replay Pact History
593-
needs: [config, sync-chain-db, build]
594-
strategy:
595-
fail-fast: false
596-
matrix: ${{ fromJson(needs.config.outputs.matrix) }}
597-
runs-on: ${{ matrix.os }}
598-
env:
599-
ARTIFACTS_NAME: chainweb-applications.${{ matrix.use-freeze-file }}.${{ matrix.ghc }}.${{ matrix.os }}
600-
steps:
601-
- uses: actions/checkout@v4
602-
- name: Download ${{ needs.config.outputs.chainweb-network-version }} chain database artifact
603-
uses: actions/download-artifact@v4
604-
with:
605-
name: chain-db-${{ needs.config.outputs.chainweb-network-version }}
606-
path: db
607-
- name: Download build artifacts
608-
uses: actions/download-artifact@v4
609-
with:
610-
name: ${{ env.ARTIFACTS_NAME }}
611-
path: .
612-
- name: Install chainweb from artifacts
613-
uses: ./.github/actions/install-chainweb-from-artifacts
614-
with:
615-
os: ${{ matrix.os }}
616-
ghc: ${{ matrix.ghc }}
617-
use-freeze-file: ${{ matrix.use-freeze-file }}
618-
- name: Write chainweb-node configuration
619-
run: |
620-
cat >> config.yaml <<EOF
621-
databaseDirectory: "db"
622-
chainweb:
623-
onlySyncPact: true
624-
logGas: true
625-
chainwebVersion: ${{ needs.config.outputs.chainweb-network-version }}
626-
validateHashesOnReplay: true
627-
p2p:
628-
peer:
629-
interface: localhost
630-
hostaddress:
631-
port: 4445
632-
private: true
633-
ignoreBootstrapNodes: true
634-
transactionIndex:
635-
enabled: false
636-
mempoolP2p:
637-
enabled: false
638-
cuts:
639-
pruneChainDatabase: headers-checked
640-
logging:
641-
telemetryBackend:
642-
enabled: false
643-
configuration:
644-
color: 'true'
645-
backend:
646-
color: 'true'
647-
filter:
648-
rules:
649-
- value: mempool
650-
key: component
651-
level: warn
652-
- value: connection-manager
653-
key: component
654-
level: warn
655-
- value: sync
656-
key: sub-component
657-
level: warn
658-
- value: MempoolAccess
659-
key: sub-component
660-
level: warn
661-
- value: PactService
662-
key: logger
663-
level: warn
664-
- value: Checkpointer
665-
key: logger
666-
level: warn
667-
default: info
668-
EOF
669-
- name: Validate database and replay pact transactions
670-
timeout-minutes: 6
671-
run: |
672-
chainweb-node +RTS -T -H1G -A64M -RTS \
673-
--config-file=config.yaml \
674-
--log-level=info \
675-
--disable-pow
575+
# validate-devnet-database:
576+
# name: Validate Devnet Database Snapshot and Replay Pact History
577+
# needs: [config, sync-chain-db, build]
578+
# strategy:
579+
# fail-fast: false
580+
# matrix: ${{ fromJson(needs.config.outputs.matrix) }}
581+
# runs-on: ${{ matrix.os }}
582+
# env:
583+
# ARTIFACTS_NAME: chainweb-applications.${{ matrix.use-freeze-file }}.${{ matrix.ghc }}.${{ matrix.os }}
584+
# steps:
585+
# - uses: actions/checkout@v4
586+
# - name: Download ${{ needs.config.outputs.chainweb-network-version }} chain database artifact
587+
# uses: actions/download-artifact@v4
588+
# with:
589+
# name: chain-db-${{ needs.config.outputs.chainweb-network-version }}
590+
# path: db
591+
# - name: Download build artifacts
592+
# uses: actions/download-artifact@v4
593+
# with:
594+
# name: ${{ env.ARTIFACTS_NAME }}
595+
# path: .
596+
# - name: Install chainweb from artifacts
597+
# uses: ./.github/actions/install-chainweb-from-artifacts
598+
# with:
599+
# os: ${{ matrix.os }}
600+
# ghc: ${{ matrix.ghc }}
601+
# use-freeze-file: ${{ matrix.use-freeze-file }}
602+
# - name: Write chainweb-node configuration
603+
# run: |
604+
# cat >> config.yaml <<EOF
605+
# databaseDirectory: "db"
606+
# chainweb:
607+
# onlySyncPact: true
608+
# logGas: true
609+
# chainwebVersion: ${{ needs.config.outputs.chainweb-network-version }}
610+
# validateHashesOnReplay: true
611+
# p2p:
612+
# peer:
613+
# interface: localhost
614+
# hostaddress:
615+
# port: 4445
616+
# private: true
617+
# ignoreBootstrapNodes: true
618+
# transactionIndex:
619+
# enabled: false
620+
# mempoolP2p:
621+
# enabled: false
622+
# cuts:
623+
# pruneChainDatabase: headers-checked
624+
# logging:
625+
# telemetryBackend:
626+
# enabled: false
627+
# configuration:
628+
# color: 'true'
629+
# backend:
630+
# color: 'true'
631+
# filter:
632+
# rules:
633+
# - value: mempool
634+
# key: component
635+
# level: warn
636+
# - value: connection-manager
637+
# key: component
638+
# level: warn
639+
# - value: sync
640+
# key: sub-component
641+
# level: warn
642+
# - value: MempoolAccess
643+
# key: sub-component
644+
# level: warn
645+
# - value: PactService
646+
# key: logger
647+
# level: warn
648+
# - value: Checkpointer
649+
# key: logger
650+
# level: warn
651+
# default: info
652+
# EOF
653+
# - name: Validate database and replay pact transactions
654+
# timeout-minutes: 6
655+
# run: |
656+
# chainweb-node +RTS -T -H1G -A64M -RTS \
657+
# --config-file=config.yaml \
658+
# --log-level=info \
659+
# --disable-pow
676660

677661
# ########################################################################## #
678662
# Run Unit Tests
@@ -686,7 +670,7 @@ jobs:
686670
matrix: ${{ fromJson(needs.config.outputs.matrix) }}
687671
env:
688672
TEST_RESULT_FILE: test-results.${{ github.run_id }}.${{ github.run_number }}.json
689-
TEST_RESULT_BUCKET: kadena-cabal-cache
673+
TEST_RESULT_BUCKET: community-kda-cabal-cache
690674
TEST_RESULT_FOLDER: chainweb-test-results/ghc-${{ matrix.ghc }}/${{ matrix.os }}
691675
ARTIFACTS_NAME: chainweb-applications.${{ matrix.use-freeze-file }}.${{ matrix.ghc }}.${{ matrix.os }}
692676
steps:
@@ -745,7 +729,7 @@ jobs:
745729
- name: Publish applications to S3
746730
run: |
747731
aws s3 cp $ARTIFACTS_ARCHIVE s3://$S3_ARTIFACT_BUCKET/$S3_ARTIFACT_FOLDER/
748-
aws s3api put-object-acl --bucket $S3_ARTIFACT_BUCKET --key=$S3_ARTIFACT_FOLDER/$ARTIFACTS_ARCHIVE --acl public-read
732+
# aws s3api put-object-acl --bucket $S3_ARTIFACT_BUCKET --key=$S3_ARTIFACT_FOLDER/$ARTIFACTS_ARCHIVE --acl public-read
749733
750734
# ########################################################################## #
751735
# Build and publish docker image
@@ -836,7 +820,7 @@ jobs:
836820
id: meta
837821
uses: docker/metadata-action@v4
838822
with:
839-
images: ghcr.io/kadena-io/chainweb-node
823+
images: ghcr.io/kda-community/chainweb-node
840824
flavor: |
841825
suffix=${{ steps.frozen-tag.outputs.value }}${{ needs.config.outputs.tag-suffix }}
842826
tags: |
@@ -874,29 +858,3 @@ jobs:
874858
labels: ${{ steps.meta.outputs.labels }}
875859
cache-from: type=local,src=/tmp/.buildx-cache
876860
cache-to: type=local,dest=/tmp/.buildx-cache
877-
878-
# ########################################################################## #
879-
# Trigger Integration Tests Run
880-
881-
integration-tests:
882-
name: Run Integration Tests from remote repo
883-
needs: [ config, docker-image ]
884-
runs-on: ubuntu-latest
885-
steps:
886-
- name: Get auth token
887-
uses: Nastaliss/get-github-app-pat@683b0b370911354c411dbbc586b7c64f32b2b850
888-
id: githubAppAuth
889-
with:
890-
app-id: ${{ secrets.GH_KADENAINFRA_APP_ID }}
891-
app-installation-id: ${{ secrets.GH_KADENAINFRA_APP_INSTALLATION_ID }}
892-
app-private-key: ${{ secrets.GH_KADENAINFRA_APP_PRIVATE_KEY }}
893-
- name: Start remote integration tests
894-
uses: the-actions-org/[email protected]
895-
with:
896-
workflow: Integration Tests on devnet chain
897-
token: ${{ steps.githubAppAuth.outputs.access-token }}
898-
inputs: '{ "chainweb_node_container_id" : "sha-${{ needs.config.outputs.git-sha-short }}${{ needs.docker-image.outputs.docker-suffix }}" }'
899-
ref: refs/heads/master
900-
repo: kadena-io/integration-tests
901-
display-workflow-run-url: true
902-
wait-for-completion: true # here you could make this pipeline wait them out

.github/workflows/nix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/checkout@v3
2121

2222
- name: Set up Nix with caching
23-
uses: kadena-io/setup-nix-with-cache/[email protected]
23+
uses: kda-community/setup-nix-with-cache/[email protected]
2424
with:
2525
cache_url: s3://nixcache.chainweb.com?region=us-east-1
2626
signing_private_key: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
@@ -34,7 +34,7 @@ jobs:
3434
aws-region: us-east-1
3535

3636
- name: Give root user AWS credentials
37-
uses: kadena-io/setup-nix-with-cache/[email protected]
37+
uses: kda-community/setup-nix-with-cache/[email protected]
3838

3939
- name: Build and cache artifacts
4040
run: |

0 commit comments

Comments
 (0)