-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
414 additions
and
318 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,33 +1,107 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
name: ci | ||
|
||
name: CI | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ master ] | ||
branches: [ master, develop ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
build-aarch64: | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.6' | ||
- run: gem install fpm -v 1.10.2 | ||
- uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: '12' | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
daemon/target | ||
key: ${{ runner.os }}-cargo-aarch64-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: aarch64-unknown-linux-gnu | ||
override: true | ||
- uses: marcopolo/cargo@master | ||
with: | ||
use-cross: true | ||
command: build | ||
args: --target aarch64-unknown-linux-gnu --features raspberry --release | ||
working-directory: daemon | ||
- run: cp -r daemon/target/aarch64-unknown-linux-gnu/release daemon/target | ||
- run: yarn install | ||
- run: yarn run build | ||
- run: yarn run dist-arm64 | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: pi-tool-deb-aarch64 | ||
path: dist/*.deb | ||
build-armv7: | ||
runs-on: ubuntu-latest | ||
|
||
# Runs a single command using the runners shell | ||
- name: Run a one-line script | ||
run: echo Hello, world! | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: Run a multi-line script | ||
run: | | ||
echo Add other actions to build, | ||
echo test, and deploy your project. | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.6' | ||
- run: gem install fpm -v 1.10.2 | ||
- uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: '12' | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
daemon/target | ||
key: ${{ runner.os }}-cargo-armv7-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: armv7-unknown-linux-gnueabihf | ||
override: true | ||
- uses: marcopolo/cargo@master | ||
with: | ||
use-cross: true | ||
command: build | ||
args: --target armv7-unknown-linux-gnueabihf --features raspberry --release | ||
working-directory: daemon | ||
- run: cp -r daemon/target/armv7-unknown-linux-gnueabihf/release daemon/target | ||
- run: yarn install | ||
- run: yarn run build | ||
- run: yarn run dist-armv7l | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: pi-tool-deb-armv7 | ||
path: dist/*.deb | ||
|
||
|
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,9 +1,9 @@ | ||
FROM arm32v7/debian:latest | ||
FROM ubuntu:latest | ||
|
||
RUN apt-get update | ||
RUN apt-get -y install curl ruby | ||
RUN curl -sL https://nodejs.org/dist/v12.18.4/node-v12.18.4-linux-armv7l.tar.xz -o node.tar.xz | ||
RUN tar -xzf node.tar.gz | ||
RUN cd node | ||
RUN cp -R * /usr/local/ | ||
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - | ||
RUN apt-get install -y nodejs | ||
RUN npm install -g yarn | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Oops, something went wrong.