Skip to content

chore(deps): update github actions #3075

chore(deps): update github actions

chore(deps): update github actions #3075

Workflow file for this run

name: CI
on:
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
verify-versions:
name: Verify Versions
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- run: npm i -g pnpm @antfu/ni
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: 18.x
cache: pnpm
- name: Install Dependencies
run: nci
- name: Verify Versions
run: nr verify-versions
format-csharp:
name: Format C#
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
submodules: true
- name: Install .NET Core
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4
with:
dotnet-version: 6.x
- name: Install ReSharper
run: |
dotnet tool install -g JetBrains.ReSharper.GlobalTools --version 2022.2.2
- name: Restore
run: |
cd packages/csharp
dotnet restore ArmoniK.Api.sln
- name: Reformat
run: |
cd packages/csharp
jb cleanupcode ArmoniK.Api.sln
- name: Check Diff
run: |
DIFF="$(git diff --name-only)"
if [ -z "$DIFF" ]; then
echo "OK: Format is clean"
else
echo "Error: Format was not clean"
echo "List of files:"
echo "$DIFF"
git diff
exit 1
fi
format-python:
name: Check linting, formatting and typing
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/python
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: pip update and add build package
run: bash proto2python.sh ~/pyvenv
- name: Install dependencies
run: |
source ~/pyvenv/bin/activate
python -m pip install uv
python -m uv pip install "$(echo pkg/armonik*.whl)[dev]"
- name: Lint
run: |
source ~/pyvenv/bin/activate
python -m ruff check .
# - name: Check typing
# run: |
# source ~/pyvenv/bin/activate
# python -m mypy --exclude src/armonik/protogen/ src/
- name: Check format
run: |
source ~/pyvenv/bin/activate
python -m ruff format .
- name: Check Diff
run: |
DIFF="$(git diff --name-only)"
if [ -z "$DIFF" ]; then
echo "OK: Format is clean"
else
echo "Error: Format was not clean"
echo "List of files:"
echo "$DIFF"
git diff
exit 1
fi
format-cpp:
name: Format C++
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Run clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format
- name: Check Diff
id: check-diff
run: |
cd packages/cpp
git ls-files *.{c,h,hpp,cpp,cc} | xargs clang-format -style=file:.clang-format -i
DIFF="$(git diff --name-only)"
if [ -z "$DIFF" ]; then
echo "OK: Format is clean"
else
echo "Error: Format was not clean"
echo "List of files:"
echo "$DIFF"
git diff
exit 1
fi
- name: Generate patch
if: ${{ failure() && steps.check-diff.conclusion == 'failure' }}
run: |
git diff > patch-cpp.diff
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
if: ${{ failure() && steps.check-diff.conclusion == 'failure' }}
with:
name: patch-cpp
path: ./patch-cpp.diff
format-protobuf:
name: Format Protobuf
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
submodules: true
- name: Check Diff
run: docker run --rm --volume "$(pwd)/Protos/V1:/workspace" --workdir /workspace bufbuild/buf:1.8.0 format -d --exit-code
format-rust:
name: Format and check Rust
strategy:
fail-fast: false
matrix:
toolchain:
- stable
- nightly
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/rust/armonik
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- uses: taiki-e/install-action@03381f5ca4d069c7f756fec5d189e036987f842e # v2
with:
tool: protoc,sccache
- name: Install toolchain
if: ${{ !contains(matrix.toolchain, 'nightly') }}
uses: dtolnay/rust-toolchain@stable
with:
components: rust-src,rust-docs,rustfmt,clippy
- name: Build
run: |
cargo build --all --locked
- name: Format
run: |
cargo fmt --all --check
- name: Doc
run: |
RUSTDOCFLAGS="-Dwarnings" cargo doc
- name: Clippy
run: |
cargo clippy --all --no-deps -- -Dwarnings -Dunused-crate-dependencies
lint-js:
name: Lint JS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- run: npm install -g [email protected]
- run: corepack enable
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run lint
build-web:
name: Build Web
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/web
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- run: npm i -g pnpm @antfu/ni
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: 18.x
cache: pnpm
- name: Install Dependencies
run: nci
- name: Install Protoc
run: sudo apt install -y protobuf-compiler
- name: Build protos
run: nr proto:generate:linux
- name: Build
run: nr build
build-angular:
name: Build Angular
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/angular
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- run: npm i -g pnpm @antfu/ni
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: 18.x
cache: pnpm
- name: Install Dependencies
run: nci
- name: Install Protoc
run: sudo apt install -y protobuf-compiler
- name: Build protos
run: nr proto:generate:linux
- name: Build
run: nr build
build-cpp-packages:
strategy:
fail-fast: false
matrix:
type: [tar.gz, deb, rpm]
name: Build C++ Packages [${{ matrix.type }}]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.ref }}
- name: Build the package
run: |
cd packages/cpp/tools/packaging
./make-${{ matrix.type }}.sh
- name: Publish package as artefact
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
if-no-files-found: error
path: packages/cpp/tools/packaging/*.${{ matrix.type }}
name: libarmonik.${{ matrix.type }}
build-java-packages:
name: Build Java
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/java
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Set up java 17
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4
with:
distribution: oracle
java-version: 17
cache: maven
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build the package
run: mvn clean install -DskipTests
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }}