Skip to content

Linux

Linux #84

name: Linux
on:
schedule:
- cron: "0 8 * * *"
workflow_dispatch:
jobs:
update:
name: Linux
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64]
include:
- arch: arm64
is_arm: true
steps:
- name: Setup ccache
uses: actions/cache@v4
with:
key: ${{ github.workflow }}-${{ matrix.arch }}
path: .ccache
- if: ${{ matrix.is_arm }}
uses: pguyot/arm-runner-action@v2
with:
base_image: https://dietpi.com/downloads/images/testing/DietPi_RPi5-ARMv8-Bookworm.img.xz
image_additional_mb: 10240
commands: |
export ARCH="arm64"
export CC="ccache -d .ccache gcc"
export CXX="ccache -d .ccache g++"
sudo apt-get update
sudo apt-get install --yes ca-certificates curl gnupg && curl -sL https://deb.nodesource.com/setup_21.x | sudo bash - && sudo apt-get update
sudo apt-get install --yes git nodejs python3 python3-pip build-essential ccache linux-headers-generic
git clone https://github.com/devraymondsh/libnode-distributable
cd libnode-distributable && node index.js
ls libnode-distributable/node/out/Release
- if: ${{ ! matrix.is_arm }}
name: Install building tools
run: |
sudo apt-get install --yes ca-certificates curl gnupg && curl -sL https://deb.nodesource.com/setup_21.x | sudo bash -
sudo apt-get update
sudo apt-get install --yes git nodejs python3 python3-pip build-essential ccache linux-headers-generic
- if: ${{ ! matrix.is_arm }}
name: Run the script
env:
ARCH: ${{ matrix.arch }}
CC: "ccache -d .ccache gcc"
CXX: "ccache -d .ccache g++"
run: cd ${GITHUB_ACTION_PATH} && node index.js
- if: ${{ ! matrix.is_arm }}
name: Find the shared library
run: ls ${GITHUB_ACTION_PATH}/node/out/Release