Skip to content

Twsting chmod without docker #472

Twsting chmod without docker

Twsting chmod without docker #472

Workflow file for this run

name: 'Bump version and make master job'
on:
push:
branches:
- 'develop'
- 'test-develop-workflow'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
version-bump:
name: 'Version Bump'
runs-on: ubuntu-20.04
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
# fetch-depth 0 means deep clone the repo
fetch-depth: 0
- name: 'Update Version'
run: |
set -x
git config user.name devops
git config user.email [email protected]
git checkout -B master origin/master
old_develop="$(git merge-base origin/develop origin/master)"
new_develop="$(git rev-parse origin/develop)"
if git diff --exit-code ${old_develop} ${new_develop} -- package/version; then
git merge --no-edit origin/develop
./package/version.sh bump
else
git merge --no-edit --strategy-option=theirs origin/develop
fi
./package/version.sh sub
if git add --update && git commit --no-edit --allow-empty --message "Set Version: $(cat package/version)"; then
git push origin master
fi
post-performance-tests:
name: 'Performace Tests'
runs-on: [self-hosted, linux, normal]
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: 'Set up Docker Test Image'
env:
BASE_OS: ubuntu
BASE_DISTRO: jammy
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_PROJECT: k-framework
BENCHER_ADAPTER: json
run: |
set -euxo pipefail
workspace=$(pwd)
docker run --name k-posting-profiling-tests-${GITHUB_SHA} \
--rm -it --detach \
-e BENCHER_API_TOKEN=$BENCHER_API_TOKEN \
-e BENCHER_PROJECT=$BENCHER_PROJECT \
-e BENCHER_ADAPTER=$BENCHER_ADAPTER \
-e GITHUB_HEAD_REF=$GITHUB_HEAD_REF \
-e GITHUB_BASE_REF=$GITHUB_BASE_REF \
-e GITHUB_TOKEN=$GITHUB_TOKEN \
-e GITHUB_ACTIONS=true \
-e GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME \
-e GITHUB_REPOSITORY=$GITHUB_REPOSITORY \
-e GITHUB_REF=$GITHUB_REF \
--workdir /opt/workspace \
-v "${workspace}:/opt/workspace" \
${BASE_OS}:${BASE_DISTRO}
- name: 'Setting up dependencies'
run: |
set -euxo pipefail
docker exec -t k-posting-profiling-tests-${GITHUB_SHA} /bin/bash -c './k-distribution/tests/profiling/setup_profiling.sh SKIP_K_BUILD'
- name: 'Getting Performance Tests Results'
run: |
set -euxo pipefail
chmod +x k-distribution/tests/profiling/post_results_to_develop.py
docker exec -t k-posting-profiling-tests-${GITHUB_SHA} /bin/bash -c 'python3 k-distribution/tests/profiling/post_results_to_develop.py'
- name: 'Posting Performance Tests Results'
run: |
set -euxo pipefail
docker exec -t k-posting-profiling-tests-${GITHUB_SHA} /bin/bash -c 'bencher run \
--if-branch "develop" --else-if-branch "master" \
--file .profiling-results.json --err --ci-only-on-alert \
--github-actions "${GITHUB_TOKEN}" 'echo "Exporting report"'
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 k-posting-profiling-tests-${GITHUB_SHA}
docker container rm --force k-posting-profiling-tests-${GITHUB_SHA} || true