Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
idruzhitskiy committed Nov 28, 2024
1 parent 475297b commit 6a8ce9e
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 56 deletions.
53 changes: 26 additions & 27 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ name: build-packages
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'

jobs:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"

jobs:
build-release:
runs-on: ubuntu-latest
strategy:
Expand All @@ -17,8 +16,8 @@ jobs:
TARGET: "x86_64-unknown-linux-musl"
BUILD_PROFILE: "release-lto"
steps:
- name: Checks-out repository
uses: actions/checkout@v2
- name: Checks-out repository
uses: actions/checkout@v4.1.7
- name: Set env variables and install packages
run: |
echo "BOB_COMMIT_HASH=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV
Expand Down Expand Up @@ -48,7 +47,7 @@ jobs:
- name: Check bobd version
run: target/${{ env.TARGET }}/${{ env.BUILD_PROFILE_DIR }}/bobd --version
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4.1.7
with:
name: bob-binaries-${{ matrix.bob_key_size }}
path: |
Expand All @@ -58,16 +57,16 @@ jobs:
target/${{ env.TARGET }}/${{ env.BUILD_PROFILE_DIR }}/bobc
target/${{ env.TARGET }}/${{ env.BUILD_PROFILE_DIR }}/ccg
target/${{ env.TARGET }}/${{ env.BUILD_PROFILE_DIR }}/brt
build-rpm:
runs-on: ubuntu-latest
needs: build-release
strategy:
matrix:
bob_key_size: [8, 16]
steps:
- name: Checks-out repository
uses: actions/checkout@v2
- name: Checks-out repository
uses: actions/checkout@v4.1.7
- name: Download artifact
uses: actions/download-artifact@v4.1.7
with:
Expand All @@ -84,7 +83,7 @@ jobs:
tar czf ./rpmbuild/SOURCES/bob-${{ env.VERSION }}.tar.gz ../${cur_dir_name}/{bobd,bobp,bobc,brt,ccg,linux-packages/bob_limits.conf,linux-packages/bob.service} ../${cur_dir_name}/config-examples/{cluster,node,logger}.yaml --transform s/${cur_dir_name}/bob-${{ env.VERSION }}/
rpmbuild -ba --define "_topdir ${PWD}/rpmbuild" linux-packages/bob.spec
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4.1.7
with:
name: bob-rpm-${{ matrix.bob_key_size }}
path: rpmbuild/RPMS/x86_64/bob-${{ env.VERSION }}-${{ github.run_id }}.x86_64.rpm
Expand All @@ -97,8 +96,8 @@ jobs:
matrix:
bob_key_size: [8, 16]
steps:
- name: Checks-out repository
uses: actions/checkout@v2
- name: Checks-out repository
uses: actions/checkout@v4.1.7
- name: Download artifact
uses: actions/download-artifact@v4.1.7
with:
Expand All @@ -109,7 +108,7 @@ jobs:
if: ${{ matrix.bob_key_size != 8 }}
run: echo "asset_name_postfix=-key${{ matrix.bob_key_size }}" >> $GITHUB_ENV
- name: Upload rpm to release
uses: svenstaro/upload-release-action@v2
uses: svenstaro/upload-release-action@v4.1.7
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bob-${{ env.VERSION }}-${{ github.run_id }}.x86_64.rpm
Expand All @@ -124,8 +123,8 @@ jobs:
matrix:
bob_key_size: [8, 16]
steps:
- name: Checks-out repository
uses: actions/checkout@v2
- name: Checks-out repository
uses: actions/checkout@v4.1.7
- name: Download artifact
uses: actions/download-artifact@v4.1.7
with:
Expand All @@ -147,7 +146,7 @@ jobs:
sed -i "s/current_version/${{ env.VERSION }}/" bob_${{ env.VERSION }}_amd64/DEBIAN/control
dpkg-deb --build ./bob_${{ env.VERSION }}_amd64
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4.1.7
with:
name: bob-deb-${{ matrix.bob_key_size }}
path: bob_${{ env.VERSION }}_amd64.deb
Expand All @@ -160,8 +159,8 @@ jobs:
matrix:
bob_key_size: [8, 16]
steps:
- name: Checks-out repository
uses: actions/checkout@v2
- name: Checks-out repository
uses: actions/checkout@v4.1.7
- name: Download artifact
uses: actions/download-artifact@v4.1.7
with:
Expand All @@ -172,7 +171,7 @@ jobs:
if: ${{ matrix.bob_key_size != 8 }}
run: echo "asset_name_postfix=_key${{ matrix.bob_key_size }}" >> $GITHUB_ENV
- name: Upload deb to release
uses: svenstaro/upload-release-action@v2
uses: svenstaro/upload-release-action@v4.1.7
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bob_${{ env.VERSION }}_amd64.deb
Expand All @@ -187,8 +186,8 @@ jobs:
matrix:
bob_key_size: [8, 16]
steps:
- name: Checks-out repository
uses: actions/checkout@v2
- name: Checks-out repository
uses: actions/checkout@v4.1.7
- name: Download artifact
uses: actions/download-artifact@v4.1.7
with:
Expand All @@ -207,7 +206,7 @@ jobs:
cp linux-packages/bob_limits.conf bob_${{ env.VERSION }}/etc/security/limits.d/bob.conf
zip -r bob_${{ env.VERSION }}.zip bob_${{ env.VERSION }}
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4.1.7
with:
name: bob-zip-${{ matrix.bob_key_size }}
path: bob_${{ env.VERSION }}.zip
Expand All @@ -220,8 +219,8 @@ jobs:
matrix:
bob_key_size: [8, 16]
steps:
- name: Checks-out repository
uses: actions/checkout@v2
- name: Checks-out repository
uses: actions/checkout@v4.1.7
- name: Download artifact
uses: actions/download-artifact@v4.1.7
with:
Expand All @@ -232,10 +231,10 @@ jobs:
if: ${{ matrix.bob_key_size != 8 }}
run: echo "asset_name_postfix=_key${{ matrix.bob_key_size }}" >> $GITHUB_ENV
- name: Upload zip file to release
uses: svenstaro/upload-release-action@v2
uses: svenstaro/upload-release-action@v4.1.7
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bob_${{ env.VERSION }}.zip
asset_name: bob_${{ env.VERSION }}${{ env.asset_name_postfix }}.zip
tag: ${{ github.ref }}
overwrite: true
overwrite: true
58 changes: 29 additions & 29 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,52 @@ name: integration-tests
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"
pull_request_review:
types: [submitted]
workflow_dispatch:
inputs:
bob_nodes_amount:
description: 'Amount of nodes in bob cluster for tests'
description: "Amount of nodes in bob cluster for tests"
required: true
default: '4'
default: "4"
quorum:
description: 'Quorum for bob cluster'
description: "Quorum for bob cluster"
required: true
default: '2'
default: "2"
bob_vdisk_count:
description: 'Vdisks count'
description: "Vdisks count"
required: true
default: '4'
default: "4"
bob_replicas_amount:
description: 'Amount of vdisks replicas'
description: "Amount of vdisks replicas"
required: true
default: '2'
default: "2"
bob_payload_size:
description: 'Payload size'
description: "Payload size"
required: true
default: '10240'
default: "10240"
bob_record_count:
description: 'Amount of records to process during test'
description: "Amount of records to process during test"
required: true
default: '100000'
default: "100000"
bob_first_index:
description: 'Index of the first record to proceed during tests'
description: "Index of the first record to proceed during tests"
required: true
default: '0'
default: "0"
bob_bobt_count:
description: 'Amount of iterations for bobt operation test'
description: "Amount of iterations for bobt operation test"
required: true
default: '100000'
default: "100000"
bob_bobt_first_index:
description: 'Bottom boundary for key in bobt test'
description: "Bottom boundary for key in bobt test"
required: true
default: '0'
default: "0"
bob_bobt_last_index:
description: 'Upper boundary for key in bobt test'
description: "Upper boundary for key in bobt test"
required: true
default: '10000'
default: "10000"
jobs:
build-binaries:
if: ${{ github.event_name != 'pull_request_review' || github.event.review.state == 'approved' }}
Expand All @@ -59,7 +59,7 @@ jobs:
BUILD_PROFILE: "integration-test"
runs-on: ubuntu-latest
steps:
- name: Checks-out repository
- name: Checks-out repository
uses: actions/checkout@v3
- name: Set env variables and install packages
run: |
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
env:
BUILD_PROFILE: "integration-test"
steps:
- name: Checks-out repository
- name: Checks-out repository
uses: actions/checkout@v3
- name: Set env
run: |
Expand All @@ -120,7 +120,7 @@ jobs:
tags: |
${{ env.VERSION }}-key${{ matrix.key }}
- name: Build image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4.1.7
with:
outputs: type=image,name=qoollo/bob:${{ env.VERSION }}-key${{ matrix.key }}
context: .
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: "3.x"
- name: Setup default variables for auto runs
run: |
INPUT="${{ github.event.inputs.bob_nodes_amount }}"
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
working-directory: ./integration-tests
- name: Deploy docker containers
run: |
./deploy.py --path /tmp/generated_configs -d ${{ env.BOB_VDISK_COUNT }} -r ${{ env.BOB_REPLICAS_AMOUNT }} -nodes_amount ${{ env.BOB_NODES_AMOUNT }} -rest_min_port ${{ env.BOB_REST_MIN_PORT }} --cluster_start_waiting_time 5000
./deploy.py --path /tmp/generated_configs -d ${{ env.BOB_VDISK_COUNT }} -r ${{ env.BOB_REPLICAS_AMOUNT }} -nodes_amount ${{ env.BOB_NODES_AMOUNT }} -rest_min_port ${{ env.BOB_REST_MIN_PORT }} --cluster_start_waiting_time 5000
working-directory: ./integration-tests
- name: Run write/read/exist tests
run: |
Expand All @@ -238,7 +238,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: "3.x"
- name: Setup default variables for auto runs
run: |
INPUT="${{ github.event.inputs.bob_nodes_amount }}"
Expand Down Expand Up @@ -314,7 +314,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: "3.x"
- name: Setup default variables for auto runs
run: |
INPUT="${{ github.event.inputs.bob_nodes_amount }}"
Expand Down

0 comments on commit 6a8ce9e

Please sign in to comment.