From 356047ea05fc737929117fe488c9f3dc0b042fba Mon Sep 17 00:00:00 2001 From: Denis Freund Date: Sun, 23 Jul 2023 16:15:22 +0200 Subject: [PATCH] chore: better cleanup chore: better cleanup fix test fix debug chore: bettercleanup --- .github/workflows/a339x-livery-package-exp.yml | 10 ++++++++++ .github/workflows/a339x-livery-package-main.yml | 10 ++++++++++ .github/workflows/a339x-livery-package-release.yml | 10 ++++++++++ .github/workflows/a339x-livery-package-staging.yml | 10 ++++++++++ .github/workflows/experimental.yml | 10 ++++++++++ .github/workflows/main.yml | 10 ++++++++++ .github/workflows/pr.yml | 10 ++++++++++ .github/workflows/release.yml | 10 ++++++++++ .github/workflows/staging.yml | 10 ++++++++++ scripts/build-a339x-liveries.sh | 7 +++++++ scripts/build_a339x.sh | 13 ++++++++++--- 11 files changed, 107 insertions(+), 3 deletions(-) diff --git a/.github/workflows/a339x-livery-package-exp.yml b/.github/workflows/a339x-livery-package-exp.yml index b0838124..6afce748 100644 --- a/.github/workflows/a339x-livery-package-exp.yml +++ b/.github/workflows/a339x-livery-package-exp.yml @@ -24,6 +24,16 @@ jobs: ZIP_NAME: hdw-a339x-liveries-main.zip BUILD_DIR_NAME: experimental steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: false + haskell: false + large-packages: false + docker-images: false + swap-storage: false - name: Checkout source uses: actions/checkout@v3 with: diff --git a/.github/workflows/a339x-livery-package-main.yml b/.github/workflows/a339x-livery-package-main.yml index 70d7f4d8..ba4f43da 100644 --- a/.github/workflows/a339x-livery-package-main.yml +++ b/.github/workflows/a339x-livery-package-main.yml @@ -24,6 +24,16 @@ jobs: ZIP_NAME: hdw-a339x-liveries-main.zip BUILD_DIR_NAME: main steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: false + haskell: false + large-packages: false + docker-images: false + swap-storage: false - name: Checkout source uses: actions/checkout@v3 with: diff --git a/.github/workflows/a339x-livery-package-release.yml b/.github/workflows/a339x-livery-package-release.yml index a6d41f5c..46a913b5 100644 --- a/.github/workflows/a339x-livery-package-release.yml +++ b/.github/workflows/a339x-livery-package-release.yml @@ -27,6 +27,16 @@ jobs: ZIP_NAME: hdw-a339x-liveries-release.zip BUILD_DIR_NAME: release steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: false + haskell: false + large-packages: false + docker-images: false + swap-storage: false - name: Checkout source uses: actions/checkout@v3 with: diff --git a/.github/workflows/a339x-livery-package-staging.yml b/.github/workflows/a339x-livery-package-staging.yml index 4c316fac..55207754 100644 --- a/.github/workflows/a339x-livery-package-staging.yml +++ b/.github/workflows/a339x-livery-package-staging.yml @@ -24,6 +24,16 @@ jobs: ZIP_NAME: hdw-a339x-liveries-staging.zip BUILD_DIR_NAME: staging steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: false + haskell: false + large-packages: false + docker-images: false + swap-storage: false - name: Checkout source uses: actions/checkout@v3 with: diff --git a/.github/workflows/experimental.yml b/.github/workflows/experimental.yml index c0d932d7..53123c61 100644 --- a/.github/workflows/experimental.yml +++ b/.github/workflows/experimental.yml @@ -15,6 +15,16 @@ jobs: EXP_ZIP_NAME: headwind-aircraft-a330-900-experimental.zip BUILD_DIR_NAME: experimental steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: false + haskell: false + large-packages: false + docker-images: false + swap-storage: false - name: Checkout source uses: actions/checkout@v3 with: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 34da2f0d..238bd9d0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,16 @@ jobs: ZIP_NAME: headwind-aircraft-a330-900-main.zip BUILD_DIR_NAME: main steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: false + haskell: false + large-packages: false + docker-images: false + swap-storage: false - name: Checkout source uses: actions/checkout@v2 with: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 90464184..dce06f84 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -29,6 +29,16 @@ jobs: runs-on: ubuntu-latest if: github.event.pull_request.draft == false steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: false + haskell: false + large-packages: false + docker-images: false + swap-storage: false - name: Checkout source uses: actions/checkout@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f9e86e60..d951b30f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,16 @@ jobs: ZIP_NAME: headwindsim-aircraft-a330-900-stable.zip BUILD_DIR_NAME: stable steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: false + haskell: false + large-packages: false + docker-images: false + swap-storage: false - name: Checkout source uses: actions/checkout@v2 with: diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 427c4769..77c47119 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -16,6 +16,16 @@ jobs: RELEASE_TAG: vstaging BUILD_DIR_NAME: staging steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: false + haskell: false + large-packages: false + docker-images: false + swap-storage: false - name: Checkout source uses: actions/checkout@v2 with: diff --git a/scripts/build-a339x-liveries.sh b/scripts/build-a339x-liveries.sh index e1cc65ed..c7231ab5 100755 --- a/scripts/build-a339x-liveries.sh +++ b/scripts/build-a339x-liveries.sh @@ -9,6 +9,7 @@ ORIGINAL_GROUP_ID=$(stat -c '%g' /external) # set ownership to root to fix cargo/rust build (when run as github action) if [ "${GITHUB_ACTIONS}" == "true" ]; then chown -R root:root /external + rm -rf /external/a32nx fi # Loop through the arguments @@ -27,6 +28,12 @@ done # run build time npx igniter -r 'a339x-livery-package' "${args[@]}" +if [ "${GITHUB_ACTIONS}" == "true" ]; then + rm -rf /external/build-a339x/src + rm -rf /external/build-a339x-acj/src + rm -rf /external/hdw-a339x-liveries/src +fi + # restore ownership (when run as github action) if [ "${GITHUB_ACTIONS}" == "true" ]; then chown -R ${ORIGINAL_USER_ID}:${ORIGINAL_GROUP_ID} /external diff --git a/scripts/build_a339x.sh b/scripts/build_a339x.sh index e6483b09..b08b21d0 100755 --- a/scripts/build_a339x.sh +++ b/scripts/build_a339x.sh @@ -6,18 +6,25 @@ set -ex ORIGINAL_USER_ID=$(stat -c '%u' /external) ORIGINAL_GROUP_ID=$(stat -c '%g' /external) +echo "Free space before:" +df -h + # set ownership to root to fix cargo/rust build (when run as github action) if [ "${GITHUB_ACTIONS}" == "true" ]; then chown -R root:root /external + rm -rf /external/a32nx + rm -rf /external/hdw-a339x-liveries fi +echo "Free space after:" +df -h + # run build -time npx igniter -r A339X "$@" +time npx igniter -r 'A339X' "$@" if [ "${GITHUB_ACTIONS}" == "true" ]; then - rm -rf /external/a32nx rm -rf /external/build-a339x/src - rm -rf /external/build-acj339x/src + rm -rf /external/build-a339x-acj/src fi # restore ownership (when run as github action)