Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add other architectures for Linux, ARM workflow #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,46 @@ on:
- '*'

jobs:
build:
build-docker:
strategy:
fail-fast: false
matrix:
include:
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04
name: LinuxARM64
platform-type: linuxarm64
arch: arm64
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04
name: LinuxARM32
platform-type: linuxarm32
arch: arm32
runs-on: ubuntu-latest
name: "Build - ${{ matrix.name }}"
container: ${{ matrix.container }}

steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install dependencies
run: npm install

- name: Pretest
run: npm run pretest

- name: Test
run: npm test

build-native:
strategy:
fail-fast: false
matrix:
Expand Down
57 changes: 45 additions & 12 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,53 @@
}],
}],
['OS=="linux"', {
'libraries': [
# These files were placed by download-CanBridge.mjs
'<(module_root_dir)/externalCompileTimeDeps/libCANBridge.a',
],
'copies': [{
'destination': './build/Release',
'files': [
# These files were placed in the prebuilds folder by download-CanBridge.mjs
'<(module_root_dir)/prebuilds/linux-x64/libCANBridge.so',
'<(module_root_dir)/prebuilds/linux-x64/libwpiHal.so',
'<(module_root_dir)/prebuilds/linux-x64/libwpiutil.so',
'conditions': [
[ 'target_arch=="x64"', {
'libraries': [
# These files were placed by download-CanBridge.mjs
'<(module_root_dir)/externalCompileTimeDeps/libCANBridge.a',
],
'copies': [{
'destination': './build/Release',
'files': [
# These files were placed in the prebuilds folder by download-CanBridge.mjs
'<(module_root_dir)/prebuilds/linux-x64/libCANBridge.so',
'<(module_root_dir)/prebuilds/linux-x64/libwpiHal.so',
'<(module_root_dir)/prebuilds/linux-x64/libwpiutil.so',
]
}],
}],
}],
[ 'target_arch=="arm"', {
'libraries': [
# These files were placed by download-CanBridge.mjs
'<(module_root_dir)/externalCompileTimeDeps/libCANBridge.a',
],
'copies': [{
'destination': './build/Release',
'files': [
# These files were placed in the prebuilds folder by download-CanBridge.mjs
'<(module_root_dir)/prebuilds/linux-arm32/libCANBridge.so',
'<(module_root_dir)/prebuilds/linux-arm32/libwpiHal.so',
'<(module_root_dir)/prebuilds/linux-arm32/libwpiutil.so',
]
}],
}],
[ 'target_arch=="arm64"', {
'libraries': [
# These files were placed by download-CanBridge.mjs
'<(module_root_dir)/externalCompileTimeDeps/libCANBridge.a',
],
'copies': [{
'destination': './build/Release',
'files': [
# These files were placed in the prebuilds folder by download-CanBridge.mjs
'<(module_root_dir)/prebuilds/linux-arm64/libCANBridge.so',
'<(module_root_dir)/prebuilds/linux-arm64/libwpiHal.so',
'<(module_root_dir)/prebuilds/linux-arm64/libwpiutil.so',
]
}],
}],
]}],
],
'msvs_settings': {
'VCCLCompilerTool': {
Expand Down
Loading