Linux #80
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
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 | |
# container: | |
# image: ubuntu:devel | |
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++" | |
apt-get update | |
apt-get install --yes ca-certificates curl gnupg && curl -sL https://deb.nodesource.com/setup_21.x | bash - && apt-get update | |
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: | | |
apt-get install --yes ca-certificates curl gnupg && curl -sL https://deb.nodesource.com/setup_21.x | bash - | |
apt-get update | |
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 |