-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4916a0
commit 7c63f9a
Showing
5 changed files
with
119 additions
and
54 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Linux daily check | ||
name: Linux | ||
|
||
on: | ||
schedule: | ||
|
@@ -7,34 +7,54 @@ on: | |
|
||
jobs: | ||
update: | ||
name: Linux daily check | ||
name: Linux | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: [amd64, arm64] | ||
include: | ||
- arch: arm64 | ||
is_arm: true | ||
# container: | ||
# image: ubuntu:devel | ||
steps: | ||
- name: Update system | ||
run: sudo apt-get update && sudo apt-get --yes upgrade | ||
|
||
- name: Install Nodejs 21 repo | ||
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 | ||
|
||
- name: Install building tools | ||
run: sudo apt-get install --yes git python3 python3-pip gcc g++ make ninja-build nodejs sudo | ||
|
||
- name: Clone the repo | ||
run: git clone https://github.com/devraymondsh/libnode-distributable | ||
|
||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- name: Run the script | ||
- 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: | ||
CC: "sccache gcc" | ||
CXX: "sccache g++" | ||
ARCH: ${{ matrix.arch }} | ||
SCCACHE_GHA_ENABLED: "true" | ||
run: cd libnode-distributable && node index.js | ||
CC: "ccache -d .ccache gcc" | ||
CXX: "ccache -d .ccache g++" | ||
run: cd ${{ github.action_path }} && node index.js | ||
|
||
- name: Find the shared library | ||
run: find libnode-distributable/node -name libnode.so\* -not -name '*.TOC' -not -name '*.toc' -exec ls {} \; | ||
- if: ${{ ! matrix.is_arm }} | ||
name: Find the shared library | ||
run: ls ${{ github.action_path }}/node/out/Release |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Macos daily check | ||
name: Macos | ||
|
||
on: | ||
schedule: | ||
|
@@ -7,28 +7,33 @@ on: | |
|
||
jobs: | ||
update: | ||
name: Macos daily check | ||
runs-on: macos-latest | ||
name: Macos | ||
strategy: | ||
matrix: | ||
arch: [amd64, arm64] | ||
include: | ||
- arch: arm64 | ||
os: macos-14 | ||
is_arm: true | ||
- arch: amd64 | ||
os: macos-13 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Install building tools | ||
run: brew install node python ninja nasm git | ||
run: brew install node python ninja nasm git ccache | ||
|
||
- name: Clone the repo | ||
run: git clone https://github.com/devraymondsh/libnode-distributable | ||
|
||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Setup ccache | ||
uses: actions/cache@v4 | ||
with: | ||
key: ${{ github.workflow }}-${{ matrix.arch }} | ||
path: .ccache | ||
|
||
- name: Run the script | ||
env: | ||
CC: "sccache cc" | ||
CXX: "sccache c++" | ||
ARCH: ${{ matrix.arch }} | ||
SCCACHE_GHA_ENABLED: "true" | ||
run: cd libnode-distributable && node index.js | ||
CC: "ccache -d .ccache cc" | ||
CXX: "ccache -d .ccache c++" | ||
run: cd ${{ github.action_path }} && node index.js | ||
|
||
- name: Find the shared library | ||
run: find libnode-distributable/node -name libnode.so\* -not -name '*.TOC' -not -name '*.toc' -exec ls {} \; | ||
run: ls ${{ github.action_path }}/node/out/Release |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Windows daily check | ||
name: Windows | ||
|
||
on: | ||
schedule: | ||
|
@@ -7,7 +7,7 @@ on: | |
|
||
jobs: | ||
update: | ||
name: Windows daily check | ||
name: Windows | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
|
@@ -19,7 +19,6 @@ jobs: | |
|
||
- uses: MinoruSekine/setup-scoop@v3 | ||
with: | ||
buckets: extras | ||
update_path: true | ||
run_as_admin: true | ||
scoop_update: true | ||
|
@@ -30,13 +29,15 @@ jobs: | |
- name: Clone the repo | ||
run: git clone https://github.com/devraymondsh/libnode-distributable | ||
|
||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Run ccache-cache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
# create-symlink: true | ||
key: ${{ github.workflow }}-${{ matrix.arch }} | ||
|
||
- name: Run the script | ||
env: | ||
ARCH: ${{ matrix.arch }} | ||
SCCACHE_GHA_ENABLED: "true" | ||
run: cd libnode-distributable ; node index.js | ||
|
||
- name: Find the shared library | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// From https://wiki.gentoo.org/wiki/Embedded_Handbook/General/Compiling_with_qemu_user_chroot | ||
/* | ||
* pass arguments to qemu binary | ||
* QEMU_CPU environment variable can be unset | ||
*/ | ||
|
||
#include <string.h> | ||
#include <unistd.h> | ||
|
||
#define XSTR(cpu) STR(cpu) | ||
#define STR(cpu) #cpu | ||
|
||
int main(int argc, char **argv, char **envp) { | ||
int this_len = strlen(argv[0]); | ||
char staticpath[this_len]; | ||
char *newargv[argc + 3]; | ||
|
||
newargv[0] = argv[0]; | ||
newargv[1] = "-cpu"; | ||
newargv[2] = XSTR(QEMU_CPU); | ||
|
||
memcpy(&newargv[3], &argv[1], sizeof(*argv) * (argc -1)); | ||
newargv[argc + 2] = NULL; | ||
memcpy(staticpath, argv[0], this_len - 1); | ||
staticpath[this_len - 1] = 0; | ||
return execve(staticpath, newargv, envp); | ||
} |