-
-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (47 loc) · 1.43 KB
/
build.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
name: Build and package
on:
pull_request:
types: [ready_for_review]
workflow_dispatch:
jobs:
vagrant-up:
runs-on: macos-12
strategy:
fail-fast: true
matrix:
provider: [virtualbox] # Add libvirt once available
name: Build Vagrant Box for ${{ matrix.provider }}
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Cache Vagrant boxes
uses: actions/cache@v2
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
restore-keys: |
${{ runner.os }}-vagrant-
- name: Install libvirt
if: matrix.provider == 'libvirt'
run: |
# Install libvirt etc
echo "libvirt is currently not supported"
exit 1
# Install vagrant plugin
# vagrant plugin install vagrant-libvirt
- name: Show Vagrant version
run: vagrant --version
- name: Run vagrant up
run: |
VAGRANT_DISABLE_VBOXSYMLINKCREATE=1 vagrant up --provider=${{ matrix.provider }}
- name: Package Vagrant box
run: vagrant package --base "preCICE-VM" --output preCICE.box
- name: Generate Vagrant box SHA256 hash
run: shasum -a 256 preCICE.box
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: precice-vagrant-box-${{ matrix.provider }}
path: preCICE.box
retention-days: 7