-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updating readme with forward-looking build instructions. * Renaming "glmns" to "gl" and "groundlight" * First crack at GHA to build images and make releases. * Only store artifacts for releases. * Fixing problems found in PR
- Loading branch information
1 parent
bf7420a
commit e92a760
Showing
5 changed files
with
104 additions
and
15 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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: build-images | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
tags: | ||
- '*' | ||
pull_request: | ||
# all branches for now while we're testing. | ||
#branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: install needed packages | ||
run: | | ||
sudo apt update | ||
sudo apt install binfmt-support | ||
sudo apt install qemu qemu-user-static | ||
sudo update-binfmts --enable | ||
- name: Detect if release | ||
run: | | ||
if [[ $GITHUB_REF == refs/tags/* ]]; then | ||
echo "IS_RELEASE=1" >> $GITHUB_ENV | ||
else | ||
echo "IS_RELEASE=0" >> $GITHUB_ENV | ||
fi | ||
# Build image with docker | ||
- name: Build the full images | ||
run: | | ||
if [[ ${IS_RELEASE} == "1" ]]; then | ||
# Do a release build. | ||
./build-docker.sh -c gl-config-release | ||
else | ||
# faster test build. | ||
./build-docker.sh -c gl-config | ||
fi | ||
# Print output directory files | ||
- name: List output files | ||
run: ls -lh deploy | ||
|
||
- name: Upload built image | ||
if: env.IS_RELEASE == '1' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: rpios-image | ||
path: ./deploy/image_*.img.xz | ||
if-no-files-found: error | ||
|
||
- name: Upload debug artifacts | ||
if: env.IS_RELEASE == '1' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: debug-files | ||
path: | | ||
./deploy/*.info | ||
./deploy/build.log | ||
if-no-files-found: error | ||
|
||
release: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: [build] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: rpios-image | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
files: '**/*' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# local build - seems like maybe it's leaking system resources sometimes? | ||
# time sudo $@ ./build.sh -c glmns-config | ||
# time sudo $@ ./build.sh -c gl-config | ||
|
||
# docker build - slower but more reliable. | ||
time PRESERVE_CONTAINER=1 $@ ./build-docker.sh -c glmns-config | ||
time PRESERVE_CONTAINER=1 $@ ./build-docker.sh -c gl-config |
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