Skip to content

Commit

Permalink
Merge pull request #1816 from skalenetwork/optimize-github-workflows
Browse files Browse the repository at this point in the history
Optimize github workflows
  • Loading branch information
DmytroNazarenko authored Feb 15, 2024
2 parents d072f44 + d0aeedb commit daffaa1
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 34 deletions.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Description

_Please provide a brief summary of your changes here. Replace this comment with your summary._

## Tests

_Describe how you tested the changes made in this pull request. Include specific tests you have added. Replace this comment with your testing methodology._

## Performance Impact

_Describe any potential impact on performance due to your changes. Include any benchmarks you performed, if applicable, and compare the results with and without your changes. Replace this comment with your performance analysis._
9 changes: 4 additions & 5 deletions .github/workflows/custom_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ jobs:
BUILD_TYPE: ${{ github.event.inputs.build_type }}
steps:
- name: update apt
run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test; sudo apt-get update
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test || true
sudo apt-get update || true
- name: install packages
run: |
sudo apt-get -y remove libzmq* || true
sudo apt-get -y install software-properties-common
sudo apt-get -y install gcc-9 g++-9
sudo apt-get -y install software-properties-common gcc-9 g++-9 || true
- name: Use g++-9 and gcov-9 by default
run: |
Expand Down Expand Up @@ -83,8 +84,6 @@ jobs:
rm -rf ./libconsensus || true
ls -1
git submodule update --init --recursive
- name: update apt
run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test;
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ jobs:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
steps:
- name: update apt
run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test; sudo apt-get update
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test || true
sudo apt-get update || true
- name: install packages
run: |
sudo apt-get -y remove libzmq* || true
sudo apt-get -y install software-properties-common
sudo apt-get -y install gcc-9 g++-9
sudo apt-get -y install software-properties-common gcc-9 g++-9 || true
- name: Use g++-9 and gcov-9 by default
run: |
Expand Down
34 changes: 8 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ defaults:
run:
shell: bash
jobs:
cancel-runs:
name: Cancel Previous Runs
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
build:
runs-on: self-hosted
env:
Expand All @@ -27,6 +19,10 @@ jobs:
ccache_compress: 'true'
ccache_compresslevel: 9
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Extract repo name
run: echo ::set-env name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')
shell: bash
Expand All @@ -42,12 +38,13 @@ jobs:
key: ${{ runner.os }}-apt-cache
ttl: 1000000 # purge cache every 1000000 seconds (10 days). This is to pull updated packages
- name: update apt
run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test; sudo apt-get update
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test || true
sudo apt-get update || true
- name: install packages
run: |
sudo apt-get -y remove libzmq* || true
sudo apt-get -y install software-properties-common
sudo apt-get -y install gcc-9 g++-9
sudo apt-get -y install software-properties-common gcc-9 g++-9 || true
- name: Use g++-9 and gcov-9 by default
run: |
Expand Down Expand Up @@ -269,21 +266,6 @@ jobs:
ls /tmp/tests/HashSnapshotTestSuitePassed || sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t HashSnapshotTestSuite -- --all --verbosity 4
ls /tmp/tests/ClientSnapshotsSuitePassed || sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t ClientSnapshotsSuite -- --all --verbosity 4
cd ..
- name: Create lcov report
run: |
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter system-files
lcov --remove coverage.info 'deps/*' --output-file coverage.info # filter dependency files
lcov --remove coverage.info 'libconsensus/deps/*' --output-file coverage.info # filter dependency files
lcov --remove coverage.info 'libconsensus/libBLS/deps/*' --output-file coverage.info # filter dependency files
lcov --remove coverage.info '.hunter/*' --output-file coverage.info # filter dependency files
- name: Upload to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.info
- name: Configure all as historic
run: |
Expand Down

0 comments on commit daffaa1

Please sign in to comment.