Skip to content

Linux

Linux #105

name: Linux
on:
schedule:
- cron: "0 8 * * *"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64]
include:
- arch: arm64
is_arm: true
docker_container: null
- arch: amd64
docker_container: ubuntu:devel
container:
image: ${{ matrix.docker_container }}
steps:
- uses: actions/checkout@v4
- name: Setup ccache
uses: actions/cache@v4
with:
path: .ccache
save-always: true
key: ${{ github.workflow }}-${{ matrix.arch }}
- 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
import_github_env: yes
image_additional_mb: 10240
commands: |
export CC="gcc"
export CXX="g++"
export ARCH="arm64"
export CCACHE_COMPRESS="true"
export CCACHE_BASEDIR="$GITHUB_WORKSPACE"
export CCACHE_DIR="$CCACHE_BASEDIR/.ccache"
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
mkdir -p "$CCACHE_DIR"
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 gcc g++ make nasm ccache linux-headers-generic
node index.js
ls 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 gcc g++ make nasm ccache linux-headers-generic
- if: ${{ ! matrix.is_arm }}
name: Run the script
env:
CC: "gcc"
CXX: "g++"
ARCH: ${{ matrix.arch }}
run: |
export CCACHE_COMPRESS="true"
export CCACHE_BASEDIR="$GITHUB_WORKSPACE"
export CCACHE_DIR="$CCACHE_BASEDIR/.ccache"
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
mkdir -p "$CCACHE_DIR"
node index.js
- if: ${{ ! matrix.is_arm }}
name: Find the shared library
run: ls node/out/Release