-
Notifications
You must be signed in to change notification settings - Fork 141
147 lines (145 loc) · 9.11 KB
/
robox.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Robox Validate
on:
push:
pull_request:
schedule:
- cron: '0 12 * * *'
jobs:
Build:
runs-on: ubuntu-20.04
env:
LANG: en_US.UTF-8
LANGUAGE: en_US:en
LC_ALL: en_US.UTF-8
steps:
- uses: actions/checkout@master
- name: Increase Limits
run: |
sudo sysctl -q vm.overcommit_ratio=100
sudo sysctl -q net.unix.max_dgram_qlen=64
sudo prlimit --pid $$ --nproc=65536:65536
sudo prlimit --pid $$ --nofile=500000:500000
printf "DefaultLimitNPROC=65536:65536\n" | sudo tee -a /etc/systemd/user.conf > /dev/null || exit 1
printf "DefaultLimitNPROC=65536:65536\n" | sudo tee -a /etc/systemd/system.conf > /dev/null || exit 1
printf "DefaultLimitNOFILE=500000:500000\n" | sudo tee -a /etc/systemd/user.conf > /dev/null || exit 1
printf "DefaultLimitNOFILE=500000:500000\n" | sudo tee -a /etc/systemd/system.conf > /dev/null || exit 1
sudo systemctl daemon-reload
systemctl --user daemon-reload
- name: Increase Swap
run: |
sudo dd if=/dev/zero of=/swap bs=1M count=4096 status=none
sudo chmod 600 /swap
sudo mkswap /swap
sudo swapon /swap
- name: Install Dependencies
env:
DEBIAN_FRONTEND: noninteractive
DEBCONF_NONINTERACTIVE_SEEN: true
run: |
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update
sudo apt-get --assume-yes install packer
packer plugins install github.com/hashicorp/vagrant
packer plugins install github.com/hashicorp/hyperv
packer plugins install github.com/hashicorp/docker
packer plugins install github.com/hashicorp/vmware
packer plugins install github.com/hashicorp/parallels
- name: Validate Generic Box Configurations
env:
GOGC: 50
PACKER_LOG: 1
GOMAXPROCS: 1
VERSION: 1.0.0
run: |
date +"%nStarting generic box validation at %r on %x%n"
sudo prlimit --pid $$ --nproc=65536:65536
sudo prlimit --pid $$ --nofile=500000:500000
export PACKER_LOG_PATH=generic-docker.txt ; packer validate generic-docker.json &>> packer-validate.txt && printf "File + generic-docker.json\n" || { printf "File - generic-docker.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=generic-hyperv.txt ; packer validate generic-hyperv.json &>> packer-validate.txt && printf "File + generic-hyperv.json\n" || { printf "File - generic-hyperv.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=generic-libvirt.txt ; packer validate generic-libvirt.json &>> packer-validate.txt && printf "File + generic-libvirt.json\n" || { printf "File - generic-libvirt.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=generic-parallels.txt ; packer validate generic-parallels.json &>> packer-validate.txt && printf "File + generic-parallels.json\n" || { printf "File - generic-parallels.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=generic-virtualbox.txt ; packer validate generic-virtualbox.json &>> packer-validate.txt && printf "File + generic-virtualbox.json\n" || { printf "File - generic-virtualbox.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=generic-vmware.txt ; packer validate generic-vmware.json &>> packer-validate.txt && printf "File + generic-vmware.json\n" || { printf "File - generic-vmware.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=generic-libvirt-x32.txt ; packer validate generic-libvirt-x32.json &>> packer-validate.txt && printf "File + generic-libvirt-x32.json\n" || { printf "File - generic-libvirt-x32.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=generic-virtualbox-x32.txt ; packer validate generic-virtualbox-x32.json &>> packer-validate.txt && printf "File + generic-virtualbox-x32.json\n" || { printf "File - generic-virtualbox-x32.json\n" ; exit 1 ; }
date +"%nFinished generic box validation at %r on %x%n"
- name: Validate Magma Box Configurations
env:
GOGC: 50
PACKER_LOG: 1
GOMAXPROCS: 1
VERSION: 1.0.0
run: |
date +"%nStarting magma box validation at %r on %x%n"
sudo prlimit --pid $$ --nproc=65536:65536
sudo prlimit --pid $$ --nofile=500000:500000
export PACKER_LOG_PATH=magma-docker.txt ; packer validate magma-docker.json &>> packer-validate.txt && printf "File + magma-docker.json\n" || { printf "File - magma-docker.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=magma-hyperv.txt ; packer validate magma-hyperv.json &>> packer-validate.txt && printf "File + magma-hyperv.json\n" || { printf "File - magma-hyperv.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=magma-libvirt.txt ; packer validate magma-libvirt.json &>> packer-validate.txt && printf "File + magma-libvirt.json\n" || { printf "File - magma-libvirt.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=magma-virtualbox.txt ; packer validate magma-virtualbox.json &>> packer-validate.txt && printf "File + magma-virtualbox.json\n" || { printf "File - magma-virtualbox.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=magma-vmware.txt ; packer validate magma-vmware.json &>> packer-validate.txt && printf "File + magma-vmware.json\n" || { printf "File - magma-vmware.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=developer-hyperv.txt ; packer validate developer-hyperv.json &>> packer-validate.txt && printf "File + developer-hyperv.json\n" || { printf "File - developer-hyperv.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=developer-libvirt.txt ; packer validate developer-libvirt.json &>> packer-validate.txt && printf "File + developer-libvirt.json\n" || { printf "File - developer-libvirt.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=developer-ova.txt ; packer validate developer-ova.json &>> packer-validate.txt && printf "File + developer-ova.json\n" || { printf "File - developer-ova.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=developer-virtualbox.txt ; packer validate developer-virtualbox.json &>> packer-validate.txt && printf "File + developer-virtualbox.json\n" || { printf "File - developer-virtualbox.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=developer-vmware.txt ; packer validate developer-vmware.json &>> packer-validate.txt && printf "File + developer-vmware.json\n" || { printf "File - developer-vmware.json\n" ; exit 1 ; }
date +"%nFinished magma box validation at %r on %x%n"
- name: Validate Lineage Box Configurations
env:
GOGC: 50
PACKER_LOG: 1
GOMAXPROCS: 1
VERSION: 1.0.0
run: |
date +"%nStarting lineage box validation at %r on %x%n"
sudo prlimit --pid $$ --nproc=65536:65536
sudo prlimit --pid $$ --nofile=500000:500000
export PACKER_LOG_PATH=lineage-hyperv.txt ; packer validate lineage-hyperv.json &>> packer-validate.txt && printf "File + lineage-hyperv.json\n" || { printf "File - lineage-hyperv.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=lineage-libvirt.txt ; packer validate lineage-libvirt.json &>> packer-validate.txt && printf "File + lineage-libvirt.json\n" || { printf "File - lineage-libvirt.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=lineage-virtualbox.txt ; packer validate lineage-virtualbox.json &>> packer-validate.txt && printf "File + lineage-virtualbox.json\n" || { printf "File - lineage-virtualbox.json\n" ; exit 1 ; }
export PACKER_LOG_PATH=lineage-vmware.txt ; packer validate lineage-vmware.json &>> packer-validate.txt && printf "File + lineage-vmware.json\n" || { printf "File - lineage-vmware.json\n" ; exit 1 ; }
date +"%nFinished lineage box validation at %r on %x%n"
- name: Validate Cache Configuration
env:
GOGC: 50
PACKER_LOG: 1
GOMAXPROCS: 1
VERSION: 1.0.0
run: |
date +"%nStarting cache box validation at %r on %x%n"
sudo prlimit --pid $$ --nproc=65536:65536
sudo prlimit --pid $$ --nofile=500000:500000
export PACKER_LOG_PATH=packer-cache.txt ; packer validate packer-cache.json &>> packer-validate.txt && printf "File + packer-cache.json\n" || { printf "File - packer-cache.json\n" ; exit 1 ; }
date +"%nFinished Cache box validation at %r on %x%n"
- name: Archive Log Files
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: validate-logs
retention-days: 14
path: |
packer-validate.txt
generic-docker.txt
generic-hyperv.txt
generic-libvirt.txt
generic-parallels.txt
generic-virtualbox.txt
generic-vmware.txt
generic-virtualbox-x32.txt
generic-libvirt-x32.txt
magma-docker.txt
magma-hyperv.txt
magma-libvirt.txt
magma-virtualbox.txt
magma-vmware.txt
developer-hyperv.txt
developer-libvirt.txt
developer-ova.txt
developer-virtualbox.txt
developer-vmware.txt
lineage-hyperv.txt
lineage-libvirt.txt
lineage-virtualbox.txt
lineage-vmware.txt
packer-cache.txt