Эх сурвалжийг харах

Merge pull request #2357 from pyth-network/devin/1738961031-update-ci-workflow-triggers

ci: update workflow triggers to run on workflow changes and all merges to main
Connor Prussin 9 сар өмнө
parent
commit
d5a75be0a1

+ 0 - 2
.github/workflows/ci-aptos-contract.yml

@@ -5,8 +5,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - target_chains/aptos/contracts/**
 
 name: Aptos Contract
 

+ 0 - 3
.github/workflows/ci-cosmwasm-contract.yml

@@ -8,9 +8,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - target_chains/cosmwasm/**
-      - wormhole_attester/sdk/rust/**
 
 env:
   CARGO_TERM_COLOR: always

+ 0 - 3
.github/workflows/ci-ethereum-contract.yml

@@ -6,9 +6,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - target_chains/ethereum/contracts/**
-      - governance/xc_admin/packages/xc_admin_common/**
 
 name: Ethereum Contract
 

+ 5 - 2
.github/workflows/ci-fortuna.yml

@@ -2,15 +2,18 @@ name: Check Fortuna
 
 on:
   pull_request:
-    paths: [apps/fortuna/**]
+    paths:
+      - apps/fortuna/**
   push:
     branches: [main]
-    paths: [apps/fortuna/**]
 jobs:
   test:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v2
+      - uses: Swatinem/rust-cache@v2
+        with:
+          workspaces: "apps/fortuna -> target"
       - uses: actions-rs/toolchain@v1
         with:
           profile: minimal

+ 0 - 2
.github/workflows/ci-foundry-test.yml

@@ -7,8 +7,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - target_chains/ethereum/sdk/stylus/**
 env:
   FOUNDRY_PROFILE: ci
 jobs:

+ 3 - 2
.github/workflows/ci-fuel-contract.yml

@@ -7,8 +7,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - target_chains/fuel/**
 
 env:
   CARGO_TERM_COLOR: always
@@ -21,6 +19,9 @@ jobs:
         working-directory: target_chains/fuel/contracts/
     steps:
       - uses: actions/checkout@v2
+      - uses: Swatinem/rust-cache@v2
+        with:
+          workspaces: "target_chains/fuel/contracts -> target"
       - name: Install Fuel toolchain
         run: |
           curl https://install.fuel.network | sh

+ 5 - 2
.github/workflows/ci-hermes-server.yml

@@ -2,15 +2,18 @@ name: Check Hermes Server
 
 on:
   pull_request:
-    paths: [apps/hermes/server/**]
+    paths:
+      - apps/hermes/server/**
   push:
     branches: [main]
-    paths: [apps/hermes/server/**]
 jobs:
   test:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v2
+      - uses: Swatinem/rust-cache@v2
+        with:
+          workspaces: "apps/hermes/server -> target"
       - uses: actions-rs/toolchain@v1
         with:
           profile: minimal

+ 3 - 2
.github/workflows/ci-lazer-rust.yml

@@ -3,8 +3,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - lazer/**
   pull_request:
     paths:
       - lazer/**
@@ -23,6 +21,9 @@ jobs:
       - uses: actions-rust-lang/setup-rust-toolchain@v1
         with:
           toolchain: 1.81.0
+      - uses: Swatinem/rust-cache@v2
+        with:
+          workspaces: "lazer -> target"
       - name: Install Foundry
         uses: foundry-rs/foundry-toolchain@v1
       - name: install extra tools

+ 0 - 2
.github/workflows/ci-lazer-sdk-evm.yml

@@ -3,8 +3,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - lazer/contracts/evm/**
   pull_request:
     paths:
       - lazer/contracts/evm/**

+ 0 - 2
.github/workflows/ci-lazer-solana-contract.yml

@@ -3,8 +3,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - lazer/**
   pull_request:
     paths:
       - lazer/**

+ 3 - 2
.github/workflows/ci-message-buffer-idl.yml

@@ -6,8 +6,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - pythnet/message_buffer/**
 jobs:
   abi-check:
     name: Check Message Buffer IDL files are up to date
@@ -18,6 +16,9 @@ jobs:
     steps:
       - name: Checkout sources
         uses: actions/checkout@v3
+      - uses: Swatinem/rust-cache@v2
+        with:
+          workspaces: "pythnet/message_buffer -> target"
       - uses: actions-rs/toolchain@v1
         with:
           profile: minimal

+ 6 - 4
.github/workflows/ci-near-contract.yml

@@ -9,10 +9,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - target_chains/near/**
-      - wormhole_attester/sdk/rust/**
-      - .github/workflows/ci-near-contract.yml
 
 env:
   CARGO_TERM_COLOR: always
@@ -26,6 +22,9 @@ jobs:
         working-directory: target_chains/near/receiver
     steps:
       - uses: actions/checkout@v2
+      - uses: Swatinem/rust-cache@v2
+        with:
+          workspaces: "target_chains/near/receiver -> target"
       - name: Test
         run: ./workspace-test.sh
   reproducible-build:
@@ -36,6 +35,9 @@ jobs:
         working-directory: target_chains/near/receiver
     steps:
       - uses: actions/checkout@v2
+      - uses: Swatinem/rust-cache@v2
+        with:
+          workspaces: "target_chains/near/receiver -> target"
       - run: sudo apt-get install -y libudev-dev
       - run: cargo +stable install --locked cargo-near@0.13.3
       - run: cargo near build reproducible-wasm

+ 5 - 2
.github/workflows/ci-remote-executor.yml

@@ -2,10 +2,10 @@ name: Check Remote Executor
 
 on:
   pull_request:
-    paths: [governance/remote_executor/**]
+    paths:
+      - governance/remote_executor/**
   push:
     branches: [main]
-    paths: [governance/remote_executor/**]
 jobs:
   test:
     runs-on: ubuntu-latest
@@ -18,6 +18,9 @@ jobs:
           toolchain: 1.73.0
           components: rustfmt, clippy
           override: true
+      - uses: Swatinem/rust-cache@v2
+        with:
+          workspaces: "governance/remote_executor -> target"
       - name: Install Solana
         run: |
           sh -c "$(curl -sSfL https://release.solana.com/v1.18.23/install)"

+ 3 - 3
.github/workflows/ci-solana-contract.yml

@@ -8,9 +8,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - target_chains/solana/**
-      - pythnet/pythnet_sdk/**
 
 env:
   CARGO_TERM_COLOR: always
@@ -23,6 +20,9 @@ jobs:
         working-directory: target_chains/solana
     steps:
       - uses: actions/checkout@v2
+      - uses: Swatinem/rust-cache@v2
+        with:
+          workspaces: "target_chains/solana -> target"
       - uses: actions-rs/toolchain@v1
         with:
           profile: minimal

+ 0 - 2
.github/workflows/ci-starknet-contract.yml

@@ -6,8 +6,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - target_chains/starknet/contracts/**
 jobs:
   check:
     name: Starknet Foundry tests

+ 5 - 2
.github/workflows/ci-starknet-tools.yml

@@ -2,10 +2,10 @@ name: Check Starknet Tools
 
 on:
   pull_request:
-    paths: [target_chains/starknet/tools/**]
+    paths:
+      - target_chains/starknet/tools/**
   push:
     branches: [main]
-    paths: [target_chains/starknet/tools/**]
 jobs:
   test:
     runs-on: ubuntu-latest
@@ -18,6 +18,9 @@ jobs:
           components: rustfmt, clippy
           override: true
       - uses: actions/checkout@v3
+      - uses: Swatinem/rust-cache@v2
+        with:
+          workspaces: "target_chains/starknet/tools/test_vaas -> target"
       - name: Install Scarb
         uses: software-mansion/setup-scarb@v1
         with:

+ 0 - 2
.github/workflows/ci-stylus-check-wasm.yml

@@ -8,8 +8,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - target_chains/ethereum/sdk/stylus/**
 permissions:
   contents: read
 concurrency:

+ 0 - 2
.github/workflows/ci-stylus-check.yml

@@ -18,8 +18,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - target_chains/ethereum/sdk/stylus/**
 concurrency:
   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
   cancel-in-progress: true

+ 3 - 2
.github/workflows/ci-stylus-nostd.yml

@@ -11,8 +11,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - target_chains/ethereum/sdk/stylus/**
 concurrency:
   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
   cancel-in-progress: true
@@ -37,6 +35,9 @@ jobs:
         with:
           toolchain: stable
           rustflags: ""
+      - uses: Swatinem/rust-cache@v2
+        with:
+          workspaces: "target_chains/ethereum/sdk/stylus -> target"
       - name: Add rust targets ${{ matrix.target }}
         run: rustup target add ${{ matrix.target }}
       - name: Cargo check

+ 10 - 8
.github/workflows/ci-sui-contract.yml

@@ -5,8 +5,6 @@ on:
   push:
     branches:
       - main
-    paths:
-      - target_chains/sui/contracts/**
 
 name: Sui Contracts
 
@@ -19,12 +17,16 @@ jobs:
         working-directory: target_chains/sui/contracts/
     steps:
       - uses: actions/checkout@v3
-
-      - name: Update rust
-        run: rustup update stable
-
-      - name: Install Sui CLI
-        run: cargo install --locked --git https://github.com/MystenLabs/sui.git --rev 041c5f2bae2fe52079e44b70514333532d69f4e6 sui
+      - uses: actions-rs/toolchain@v1
+        with:
+          profile: minimal
+          toolchain: 1.77.0
+          override: true
+      - uses: taiki-e/cache-cargo-install-action@v2
+        with:
+          tool: sui
+          git: https://github.com/MystenLabs/sui.git
+          rev: 041c5f2bae2fe52079e44b70514333532d69f4e6
 
       - name: Run tests
         run: sui move test

+ 0 - 8
.github/workflows/ci-turbo-build.yml

@@ -11,14 +11,6 @@ on:
       - "**/tsconfig.json"
   push:
     branches: [main]
-    paths:
-      - "**.tsx?"
-      - "**.jsx?"
-      - "**.json"
-      - "**.sol"
-      - "**/package.json"
-      - "**/package-lock.json"
-      - "**/tsconfig.json"
 jobs:
   build:
     runs-on: ubuntu-latest

+ 0 - 8
.github/workflows/ci-turbo-test.yml

@@ -11,14 +11,6 @@ on:
       - "**/tsconfig.json"
   push:
     branches: [main]
-    paths:
-      - "**.tsx?"
-      - "**.jsx?"
-      - "**.json"
-      - "**.sol"
-      - "**/package.json"
-      - "**/package-lock.json"
-      - "**/tsconfig.json"
 jobs:
   test:
     runs-on: ubuntu-latest