forked from pantharshit00/prisma-rpi-builds
-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (56 loc) · 2.16 KB
/
Copy pathbuild.yml
File metadata and controls
61 lines (56 loc) · 2.16 KB
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
60
61
name: build armv7
on:
workflow_dispatch:
inputs:
tag:
description: "Commit on the given branch to build"
required: true
jobs:
build:
name: "ARMv7 engines build on tag ${{ github.event.inputs.tag }}"
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.event.inputs.tag }}
uses: actions/checkout@v2
with:
repository: "prisma/prisma-engines"
ref: ${{ github.event.inputs.tag }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: armv7-unknown-linux-gnueabihf
override: true
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup cross with custom image
run: |-
cat <<EOF > Cross.toml
[target.armv7-unknown-linux-gnueabihf]
image = "pantharshit00/prisma-armv7-build-image:latest"
EOF
- name: List files for verification
run: ls -al && cat Cross.toml
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target armv7-unknown-linux-gnueabihf --release
- name: Rename Node API file
run: |
mv ${{ github.workspace }}/target/armv7-unknown-linux-gnueabihf/release/libquery_engine.so ${{ github.workspace }}/target/armv7-unknown-linux-gnueabihf/release/libquery_engine_napi.so.node
- uses: ncipollo/release-action@v1
with:
tag: ${{ github.event.inputs.tag }}
commit: master
token: ${{ secrets.GITHUB_TOKEN }}
body: "Automatic release via CI: ${{ github.event.inputs.tag }}"
artifacts: |
${{ github.workspace }}/target/armv7-unknown-linux-gnueabihf/release/query-engine,
${{ github.workspace }}/target/armv7-unknown-linux-gnueabihf/release/prisma-fmt,
${{ github.workspace }}/target/armv7-unknown-linux-gnueabihf/release/schema-engine,
${{ github.workspace }}/target/armv7-unknown-linux-gnueabihf/release/libquery_engine_napi.so.node