Skip to content

Commit

Permalink
chore: better cleanup
Browse files Browse the repository at this point in the history
chore: better cleanup


fix


test


fix


debug


chore: bettercleanup
  • Loading branch information
Revyn112 committed Jul 23, 2023
1 parent d13eb09 commit 356047e
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/a339x-livery-package-exp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/a339x-livery-package-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/a339x-livery-package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/a339x-livery-package-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions scripts/build-a339x-liveries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
13 changes: 10 additions & 3 deletions scripts/build_a339x.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 356047e

Please sign in to comment.