Skip to content

Commit

Permalink
[INLONG-10048][Tools] Remove more useless paths to release more size …
Browse files Browse the repository at this point in the history
…for workflows (#10049)
  • Loading branch information
dockerzhang committed Apr 23, 2024
1 parent 5916eef commit ba53a62
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 65 deletions.
34 changes: 13 additions & 21 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

# Release space size
- name: Remove unnecessary packages
run: |
echo "=== Before pruning ==="
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache
echo "=== After pruning ==="
df -h
- name: Set up JDK
uses: actions/setup-java@v3
with:
Expand All @@ -70,32 +82,12 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.m2/repository/*/*/*
!~/.m2/repository/org/apache/inlong
!~/.m2/repository/com/github/eirslett
key: ${{ runner.os }}-inlong-build-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-inlong-build

- name: Set up swapfile path
run: |
sudo sysctl -w vm.max_map_count=262144
sudo sysctl -w fs.file-max=65536
sudo fallocate -l 5G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
- name: Remove unnecessary packages
run: |
echo "=== Before pruning ==="
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
echo
echo "=== After pruning ==="
df -h
- name: Build with Maven
run: |
mvn --batch-mode --update-snapshots -e -V clean install -DskipTests -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Daether.connector.http.reuseConnections=false -Daether.connector.requestTimeout=60000
Expand Down
34 changes: 13 additions & 21 deletions .github/workflows/ci_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

# Release space size
- name: Remove unnecessary packages
run: |
echo "=== Before pruning ==="
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache
echo "=== After pruning ==="
df -h
- name: Set up JDK
uses: actions/setup-java@v3
with:
Expand All @@ -76,31 +88,11 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.m2/repository/*/*/*
!~/.m2/repository/org/apache/inlong
key: ${{ runner.os }}-inlong-docker-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-inlong-docker

- name: Set up swapfile path
run: |
sudo sysctl -w vm.max_map_count=262144
sudo sysctl -w fs.file-max=65536
sudo fallocate -l 5G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
- name: Remove unnecessary packages
run: |
echo "=== Before pruning ==="
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
echo
echo "=== After pruning ==="
df -h
- name: Build Docker images
run: mvn --batch-mode --update-snapshots -e -V clean package -DskipTests -Pdocker
env:
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/ci_ut_flink13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

# Release space size
- name: Remove unnecessary packages
run: |
echo "=== Before pruning ==="
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache
echo "=== After pruning ==="
df -h
- name: Set up JDK
uses: actions/setup-java@v3
with:
Expand All @@ -49,7 +61,7 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.m2/repository/*/*/*
!~/.m2/repository/org/apache/inlong
key: ${{ runner.os }}-inlong-flink13-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-inlong-flink13
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/ci_ut_flink15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

# Release space size
- name: Remove unnecessary packages
run: |
echo "=== Before pruning ==="
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache
echo "=== After pruning ==="
df -h
- name: Set up JDK
uses: actions/setup-java@v3
with:
Expand All @@ -49,7 +61,7 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.m2/repository/*/*/*
!~/.m2/repository/org/apache/inlong
key: ${{ runner.os }}-inlong-flink15-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-inlong-flink15
Expand Down
34 changes: 13 additions & 21 deletions .github/workflows/codeql_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

# Release space size
- name: Remove unnecessary packages
run: |
echo "=== Before pruning ==="
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache
echo "=== After pruning ==="
df -h
# Set up jdk
- name: Set up JDK
uses: actions/setup-java@v3
Expand All @@ -55,32 +67,12 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.m2/repository/*/*/*
!~/.m2/repository/org/apache/inlong
!~/.m2/repository/com/github/eirslett
key: ${{ runner.os }}-inlong-codesql-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-inlong-codesql

- name: Set up swapfile path
run: |
sudo sysctl -w vm.max_map_count=262144
sudo sysctl -w fs.file-max=65536
sudo fallocate -l 5G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
- name: Remove unnecessary packages
run: |
echo "=== Before pruning ==="
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
echo
echo "=== After pruning ==="
df -h
- name: Build with Maven
run: |
mvn --batch-mode --update-snapshots -e -V clean install -DskipTests -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Daether.connector.http.reuseConnections=false -Daether.connector.requestTimeout=60000
Expand Down

0 comments on commit ba53a62

Please sign in to comment.