-
Notifications
You must be signed in to change notification settings - Fork 2
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 #6 from RichDom2185/dev
Improve the out-of-the-box experience
- Loading branch information
Showing
40 changed files
with
563 additions
and
237 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 |
---|---|---|
|
@@ -4,55 +4,63 @@ on: | |
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'sling-*' | ||
- "sling-*" | ||
- "dev-*" | ||
- "release-*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- uses: satackey/[email protected] | ||
- name: install brickstrap | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --yes --no-install-recommends libguestfs-tools qemu-user-static binfmt-support | ||
curl -LO https://raw.githubusercontent.com/ev3dev/brickstrap/master/src/brickstrap.sh | ||
- name: build sling and sinter | ||
run: ./build_sling.sh | ||
- name: check the outputs | ||
run: | | ||
file build-ev3/sling build-ev3/sinter_host | ||
- name: make vmlinuz readable | ||
run: sudo chmod 755 /boot/vmlinuz* | ||
- name: build image | ||
run: ./build_image.sh | ||
- uses: actions/upload-artifact@v2 | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
with: | ||
name: image | ||
path: ev3-source.img.zip | ||
if-no-files-found: error | ||
- id: create_release | ||
uses: actions/create-release@v1 | ||
if: ${{ github.event_name == 'push' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
body: "" | ||
draft: true | ||
- id: tag_name | ||
if: ${{ github.event_name == 'push' }} | ||
run: echo ::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/} | ||
- uses: actions/upload-release-asset@v1 | ||
if: ${{ github.event_name == 'push' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./ev3-source.img.zip | ||
asset_name: ev3-source-${{ steps.tag_name.outputs.TAG_NAME }}.img.zip | ||
asset_content_type: application/zip | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- uses: satackey/[email protected] | ||
- name: install brickstrap | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --yes --no-install-recommends libguestfs-tools qemu-user-static binfmt-support | ||
curl -LO https://raw.githubusercontent.com/ev3dev/brickstrap/master/src/brickstrap.sh | ||
- name: build sling and sinter | ||
run: ./build_sling.sh | ||
- name: build qrcode generator | ||
run: ./build_qrcode.sh | ||
- name: build nus login program | ||
run: ./build_prompt.sh | ||
- name: build uuidtob62 | ||
run: ./build_uuidtob62.sh | ||
- name: check the outputs | ||
run: | | ||
file build-ev3/sling build-ev3/sinter_host file build-ev3/executables/show_qrcode build-ev3/executables/nus_login build-ev3/executables/uuidtob62 | ||
- name: make vmlinuz readable | ||
run: sudo chmod 755 /boot/vmlinuz* | ||
- name: build image | ||
run: ./build_image.sh | ||
- uses: actions/upload-artifact@v2 | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
with: | ||
name: image | ||
path: ev3-source.img.zip | ||
if-no-files-found: error | ||
- id: create_release | ||
uses: actions/create-release@v1 | ||
if: ${{ github.event_name == 'push' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
body: "" | ||
draft: true | ||
- id: tag_name | ||
if: ${{ github.event_name == 'push' }} | ||
run: echo ::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/} | ||
- uses: actions/upload-release-asset@v1 | ||
if: ${{ github.event_name == 'push' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./ev3-source.img.zip | ||
asset_name: ev3-source-${{ steps.tag_name.outputs.TAG_NAME }}.img.zip | ||
asset_content_type: application/zip |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
/build-ev3 | ||
/image/sling | ||
/image/sinter_host | ||
/image/executables |
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,3 +1,12 @@ | ||
[submodule "sling"] | ||
path = sling | ||
url = https://github.com/source-academy/sling.git | ||
[submodule "go_ev3_qrcode_generator"] | ||
path = go_ev3_qrcode_generator | ||
url = https://github.com/RichDom2185/go_ev3_qrcode_generator | ||
[submodule "uuidtob62"] | ||
path = uuidtob62 | ||
url = https://github.com/RichDom2185/uuidtob62.git | ||
[submodule "ev3dev-peap-gui-login"] | ||
path = ev3dev-peap-gui-login | ||
url = https://github.com/RichDom2185/ev3dev-peap-gui-login.git |
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
FROM ev3dev/debian-stretch-armel-cross | ||
# valac does not work with multiarch, hence using debian-stretch-armel-cross, not debian-stretch-cross | ||
# valac is preinstalled in debian-stretch-armel-cross | ||
RUN ["sudo", "bash", "-c", "apt-get update && apt install --yes --no-install-recommends libev3devkit-dev:armel libgudev-1.0-dev:armel"] | ||
ENTRYPOINT [ "/usr/bin/valac", "--pkg=linux", "--pkg=posix", "--pkg=ev3devkit-0.5", "--pkg=gio-unix-2.0", "--pkg=grx-3.0", "--pkg=glib-2.0", "--pkg=gudev-1.0" ] |
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
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,17 @@ | ||
#!/bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
SCRIPT_DIR="$(dirname "$(realpath -s "${BASH_SOURCE[0]}")")" | ||
REPO_DIR="ev3dev-peap-gui-login" | ||
IMAGE_NAME="sourceacademy/ev3-vala-compiler" | ||
|
||
cd "$SCRIPT_DIR/$REPO_DIR" | ||
docker build -t "$IMAGE_NAME" . | ||
|
||
cd "$SCRIPT_DIR" | ||
mkdir -p build-ev3/executables | ||
docker run --rm -v "$(realpath "$SCRIPT_DIR")":/src -w /src -u 0:0 "$IMAGE_NAME" -o build-ev3/executables/nus_login "$REPO_DIR/main.vala" | ||
|
||
# Clean up | ||
docker rmi "$IMAGE_NAME" |
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,13 @@ | ||
#!/bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
SCRIPT_DIR="$(dirname "$(realpath -s "${BASH_SOURCE[0]}")")" | ||
cd "$SCRIPT_DIR" | ||
REPO_DIR="go_ev3_qrcode_generator" | ||
|
||
docker run --rm -v "$(realpath "$SCRIPT_DIR")/$REPO_DIR":/usr/src/qrcode -w /usr/src/qrcode -e GOOS=linux -e GOARCH=arm -e GOARM=5 golang:1.17 go build -v -o show_qrcode | ||
|
||
cd "$SCRIPT_DIR" | ||
mkdir -p build-ev3/executables | ||
mv "$REPO_DIR/show_qrcode" build-ev3/executables/ |
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,13 @@ | ||
#!/bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
SCRIPT_DIR="$(dirname "$(realpath -s "${BASH_SOURCE[0]}")")" | ||
cd "$SCRIPT_DIR" | ||
REPO_DIR="uuidtob62" | ||
|
||
docker run --rm -v "$(realpath "$SCRIPT_DIR")/$REPO_DIR":/usr/src/uuidtob62 -w /usr/src/uuidtob62 -e GOOS=linux -e GOARCH=arm -e GOARM=5 golang:1.17 go build -v -o uuidtob62 | ||
|
||
cd "$SCRIPT_DIR" | ||
mkdir -p build-ev3/executables | ||
mv "$REPO_DIR/uuidtob62" build-ev3/executables/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Oops, something went wrong.