Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/free GitHub actions storage #552

Merged
merged 15 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/actions/free_disk_space/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Free disk space
description: This actions cleans up the disk space of github actions
runs:
using: composite
steps:
- name: Check disk space
shell: bash
run: df -h
- name: Free disk space
shell: bash
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
echo "some directories deleted"
sudo apt install aptitude -y >/dev/null 2>&1
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
google-cloud-sdk imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete libmysqlclient \
unixodbc-dev yarn chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
-y -f >/dev/null 2>&1
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
echo "some packages purged"
- name: Check disk space again
shell: bash
run: df -h
- name: Get more space
shell: bash
run: |
sudo rm -rf ${GITHUB_WORKSPACE}/.git
df . -h
2 changes: 1 addition & 1 deletion .github/actions/postman_tests_cardano_rosetta/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runs:
using: composite
steps:
- name: Run
run: docker run --rm -d -p 8080:8080 --name cardano-rosetta --shm-size=2g cardano-rosetta:${{ inputs.tag }}
run: docker run --rm -d -p 8080:8080 --name cardano-rosetta-postman-tests --shm-size=2g cardano-rosetta:${{ inputs.tag }}
shell: bash
- name: Wait for docker to start
run: sleep 60
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/smoke_test_cardano_rosetta/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ runs:
using: composite
steps:
- name: Run
run: docker run --rm -d -p 8080:8080 --name cardano-rosetta --shm-size=2g cardano-rosetta:${{ inputs.tag }}
run: docker run --rm -d -p 8080:8080 --name cardano-rosetta-smoke-test --shm-size=2g cardano-rosetta:${{ inputs.tag }}
shell: bash
- name: Test
run: |
sleep 10
${{ inputs.test-exe }} ${{ inputs.network-identifier }}
docker stop cardano-rosetta
docker stop cardano-rosetta-smoke-test
shell: bash
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
uses: actions/checkout@v2
with:
path: cardano-rosetta
- name: Free Diskspace
uses: ./cardano-rosetta/.github/actions/free_disk_space
- name: Setup Node.js
uses: actions/setup-node@v1
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/post_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Free Diskspace
uses: ./.github/actions/free_disk_space
- name: Build Cardano Rosetta - mainnet
uses: ./.github/actions/build_cardano_rosetta
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/post_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Free Diskspace
uses: ./.github/actions/free_disk_space
- name: Build Cardano Rosetta - mainnet
uses: ./.github/actions/build_cardano_rosetta
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Free Diskspace
uses: ./.github/actions/free_disk_space
- name: Build from Git URL with no cache
run: docker build
-t cardano-rosetta:${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion config/network/mainnet/cardano-db-sync/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"EnableLogMetrics": false,
"EnableLogging": true,
"NetworkName": "mainnet",
"NodeConfigFile": "config.json",
"NodeConfigFile": "../cardano-node/config.json",
"PrometheusPort": 8080,
"RequiresNetworkMagic": "RequiresNoMagic",
"defaultBackends": [
Expand Down
8 changes: 4 additions & 4 deletions config/network/mainnet/cardano-node/config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"AlonzoGenesisFile": "../genesis/alonzo-genesis.json",
"AlonzoGenesisFile": "../genesis/alonzo.json",
"AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
"ByronGenesisFile": "../genesis/byron-genesis.json",
"ByronGenesisFile": "../genesis/byron.json",
"ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb",
"ConwayGenesisFile": "../genesis/conway-genesis.json",
"ConwayGenesisFile": "../genesis/conway.json",
"ConwayGenesisHash": "de609b281cb3d8ae91a9d63a00c87092975612d603aa54c0f1c6a781e33d6e1e",
"EnableP2P": true,
"LastKnownBlockVersion-Alt": 0,
Expand All @@ -14,7 +14,7 @@
"PeerSharing": true,
"Protocol": "Cardano",
"RequiresNetworkMagic": "RequiresNoMagic",
"ShelleyGenesisFile": "../genesis/shelley-genesis.json",
"ShelleyGenesisFile": "../genesis/shelley.json",
"ShelleyGenesisHash": "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81",
"TargetNumberOfActivePeers": 20,
"TargetNumberOfEstablishedPeers": 50,
Expand Down
Loading