-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #223 from dbast/vagrant
Add vagrant test workflow, enable handling qemu binaries being symlinks
- Loading branch information
Showing
3 changed files
with
76 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: All | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
|
@@ -51,7 +51,7 @@ jobs: | |
path: packer-builder-arm | ||
key: key-${{ github.sha }}-1 | ||
|
||
build: | ||
test: | ||
needs: compile | ||
strategy: | ||
fail-fast: false | ||
|
@@ -112,3 +112,60 @@ jobs: | |
- name: Build image | ||
run: sudo ./packer build boards/${{ matrix.boards }} | ||
|
||
test-vagrant: | ||
needs: compile | ||
runs-on: macos-10.15 | ||
name: Build board with vagrant | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Cache Vagrant boxes | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.vagrant.d/boxes | ||
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }} | ||
restore-keys: | | ||
${{ runner.os }}-vagrant- | ||
- name: Show Vagrant version | ||
run: vagrant --version | ||
|
||
- name: Install Vagrant plugins | ||
run: | | ||
vagrant plugin install vagrant-disksize | ||
- name: Run vagrant up | ||
run: | | ||
vagrant up | ||
- name: Upload source | ||
run: | | ||
git archive -o repo.tar.gz HEAD | ||
vagrant upload repo.tar.gz /home/vagrant/repo.tar.gz | ||
vagrant ssh -c " \ | ||
rm -rf packer-builder-arm && \ | ||
mkdir packer-builder-arm && \ | ||
tar -xf repo.tar.gz -C packer-builder-arm \ | ||
" | ||
- name: Retrieve cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: packer-builder-arm | ||
key: key-${{ github.sha }}-1 | ||
|
||
- name: Upload packer-build-arm binary | ||
run: | | ||
vagrant upload packer-builder-arm /home/vagrant/packer-builder-arm/packer-builder-arm | ||
- name: Build board | ||
run: | | ||
vagrant ssh -c " \ | ||
cd packer-builder-arm && \ | ||
sudo packer build boards/raspberry-pi-3/archlinuxarm.json \ | ||
" | ||
- name: Check result | ||
run: | | ||
vagrant ssh -c "ls -al packer-builder-arm/raspberry-pi-3.img" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters