Linux #89
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: | |
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: | |
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 nodejs python3 python3-pip gcc g++ make ccache linux-headers-generic | |
node index.js | |
ls 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 nodejs python3 python3-pip gcc g++ make 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: node index.js | |
- if: ${{ ! matrix.is_arm }} | |
name: Find the shared library | |
run: ls /node/out/Release |