-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (46 loc) · 1.42 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: CI
on: push
jobs:
CI:
runs-on: ubuntu-latest
steps:
- name: Init
run: |
df -h
sudo apt-get update
- name: Maximize free space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Freespace Check
run: |
df -h
REQUIRED_FREE_SPACE=25
free_space=$(df -h . | awk '{print $4}' | grep "G")
free_space="${free_space%G}"
if [ -z "$free_space" ]; then
echo "ERROR: free_space variable is empty or not set." >&2
exit 1
fi
df -h
echo "Free space (required): ${REQUIRED_FREE_SPACE} GB"
echo "Free space (available): ${free_space} GB"
if (( REQUIRED_FREE_SPACE > free_space )); then
echo "ERROR: Insufficient free space: ${free_space} GB available, ${REQUIRED_FREE_SPACE} GB required." >&2
exit 1
fi
- name: Install requirements
run: |
df -h
sudo apt-get update
sudo apt-get install -y make curl
- name: ADORe Setup Test
run: |
df -h
bash <(curl -sSL https://raw.githubusercontent.com/DLR-TS/adore_tools/master/tools/adore_setup.sh) --headless