Skip to content

Commit

Permalink
add drone action
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilb committed Jun 18, 2024
1 parent d34699a commit 232bf7b
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 2 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: libession-util-nodejs build test

on:
push:
branches:
- main
- dev
- test-audric

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, macos-11, ubuntu-20.04]
env:
SIGNAL_ENV: production
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: git config --global core.autocrlf false

- name: Checkout git repo
uses: actions/checkout@v4
with:
submodules: 'recursive'


- name: Install node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.3.1
if: runner.os == 'Windows'

- name: Setup node for windows
if: runner.os == 'Windows'
shell: bash
run: |
yarn global add node-gyp@latest
- name: Install dependencies
shell: bash
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --network-timeout 600000
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
cmake_minimum_required(VERSION 3.19)
cmake_policy(SET CMP0091 NEW)
cmake_policy(SET CMP0042 NEW)
cmake_policy(SET CMP0069 NEW)
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)

set(VERBOSE ON)

add_definitions(-DNAPI_VERSION=8)
set(CMAKE_CONFIGURATION_TYPES Release Debug)
set(CMAKE_CONFIGURATION_TYPES Release)

# if(APPLE)
set(CC /usr/bin/gcc)
set(CXX /usr/bin/g++)
# endif()


project(libsession_util_nodejs LANGUAGES CXX)

Expand All @@ -18,6 +29,7 @@ file(GLOB SOURCE_FILES src/*.cpp)

add_subdirectory(libsession-util)


if(MSVC)
# Windows is horrible
add_compile_definitions(NOMINMAX)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"email": "team@oxen.io"
},
"scripts": {
"install": "cmake-js compile --runtime=electron --runtime-version=25.8.4 -p16 --CDSUBMODULE_CHECK=OFF --CDLOCAL_MIRROR=https://oxen.rocks/deps"
"install": "SDKROOT=\"$(xcrun --sdk macosx --show-sdk-path)\" cmake-js compile --runtime=electron --runtime-version=25.8.4 -p1 --CDSUBMODULE_CHECK=OFF --CDLOCAL_MIRROR=https://oxen.rocks/deps"
},
"devDependencies": {
"clang-format": "^1.8.0"
Expand Down

0 comments on commit 232bf7b

Please sign in to comment.