Skip to content

Build executables

Build executables #16

Workflow file for this run

# Copyright (c) 2022 Robert Bosch GmbH
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
name: Build executables
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
workflow_call:
inputs:
ref:
description: 'Commit ref to use'
required: false
type: string
workflow_dispatch:
inputs:
ref:
description: 'Commit ref to use'
required: false
type: string
jobs:
compile:
strategy:
matrix:
arch: [arm64, x64]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- uses: actions/setup-node@v3
with:
node-version: 18
# This step is needed to install needed dependencies (node-pty) for arm based architecture
- name: Install dependencies for ARM64
if: ${{ matrix.arch == 'arm64' }}
uses: uraimo/run-on-arch-action@v2
with:
base_image: arm64v8/node:lts-bullseye
run: |
npm install .
- name: Install dependencies for AMD64
if: ${{ matrix.arch == 'x64' }}
run: |
npm install .
- name: Compile EXE for ${{ matrix.arch }}
run: TARGET=node18-linux-${{ matrix.arch }} ARCH=${{ matrix.arch }} npm run compile-exe
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.arch }}
path: velocitas-linux-${{ matrix.arch }}