Skip to content

Commit

Permalink
Changed: renamed core to modules/build
Browse files Browse the repository at this point in the history
  • Loading branch information
alMukaafih committed Jul 18, 2024
1 parent a5bce07 commit d245e40
Show file tree
Hide file tree
Showing 64 changed files with 254 additions and 222 deletions.
47 changes: 24 additions & 23 deletions .github/workflows/CI.yml → .github/workflows/build-module-ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: CI
name: Build Module CI
env:
DEBUG: napi:*
APP_NAME: core
APP_NAME: build
MACOSX_DEPLOYMENT_TARGET: '10.13'
APP_VERSION: 0.6.0
APP_PATH: modules/build
permissions:
contents: write
id-token: write
Expand All @@ -15,12 +15,13 @@ permissions:
tags-ignore:
- '**'
paths:
- core
- .github/workflows/CI.yml
- modules/build
- .github/workflows/build-module-ci.yml
pull_request: null
defaults:
run:
working-directory: ./core
working-directory: modules/build

jobs:
build:
strategy:
Expand All @@ -42,13 +43,13 @@ jobs:
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |
cd core
cd modules/build
yarn build --target x86_64-unknown-linux-gnu
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
cd core
cd modules/build
yarn build --target x86_64-unknown-linux-musl
- host: macos-latest
target: aarch64-apple-darwin
Expand All @@ -57,7 +58,7 @@ jobs:
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |
cd core
cd modules/build
yarn build --target aarch64-unknown-linux-gnu
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
Expand All @@ -80,7 +81,7 @@ jobs:
build: |-
set -e &&
rustup target add aarch64-unknown-linux-musl &&
cd core &&
cd modules/build &&
yarn build --target aarch64-unknown-linux-musl
- host: windows-latest
target: aarch64-pc-windows-msvc
Expand Down Expand Up @@ -151,7 +152,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
path: "${{ env.APP_NAME }}/${{ env.APP_NAME }}.*.node"
path: ${{ env.APP_PATH }}/${{ env.APP_NAME }}.*.node
if-no-files-found: error
build-freebsd:
runs-on: ubuntu-latest
Expand All @@ -171,7 +172,7 @@ jobs:
version: '14.0'
memory: 8G
cpu_count: 3
environment_variables: 'DEBUG RUSTUP_IO_THREADS'
environment_variables: DEBUG RUSTUP_IO_THREADS
shell: bash
run: |
sudo pkg install -y -f curl node libnghttp2 npm yarn
Expand All @@ -185,7 +186,7 @@ jobs:
node -v
echo "~~~~ yarn --version ~~~~"
yarn --version
cd core
cd ${{ env.APP_PATH }}
pwd
ls -lah
whoami
Expand All @@ -200,7 +201,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: bindings-freebsd
path: "${{ env.APP_NAME }}/${{ env.APP_NAME }}.*.node"
path: ${{ env.APP_PATH }}/${{ env.APP_NAME }}.*.node
if-no-files-found: error
test-macOS-windows-binding:
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
Expand Down Expand Up @@ -231,7 +232,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
path: ${{ env.APP_NAME }}/.
path: ${{ env.APP_PATH }}/.
- name: List packages
run: ls -R .
shell: bash
Expand Down Expand Up @@ -263,7 +264,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: bindings-x86_64-unknown-linux-gnu
path: ${{ env.APP_NAME }}/.
path: ${{ env.APP_PATH }}/.
- name: List packages
run: ls -R .
shell: bash
Expand Down Expand Up @@ -296,7 +297,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: bindings-x86_64-unknown-linux-musl
path: ${{ env.APP_NAME }}/.
path: ${{ env.APP_PATH }}/.
- name: List packages
run: ls -R .
shell: bash
Expand All @@ -319,7 +320,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: bindings-aarch64-unknown-linux-gnu
path: ${{ env.APP_NAME }}/.
path: ${{ env.APP_PATH }}/.
- name: List packages
run: ls -R .
shell: bash
Expand Down Expand Up @@ -355,7 +356,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: bindings-aarch64-unknown-linux-musl
path: ${{ env.APP_NAME }}/.
path: ${{ env.APP_PATH }}/.
- name: List packages
run: ls -R .
shell: bash
Expand Down Expand Up @@ -396,7 +397,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: bindings-armv7-unknown-linux-gnueabihf
path: ${{ env.APP_NAME }}/.
path: ${{ env.APP_PATH }}/.
- name: List packages
run: ls -R .
shell: bash
Expand Down Expand Up @@ -438,19 +439,19 @@ jobs:
uses: actions/download-artifact@v4
with:
name: bindings-x86_64-apple-darwin
path: ${{ env.APP_NAME }}/artifacts
path: ${{ env.APP_PATH }}/artifacts
- name: Download macOS arm64 artifact
uses: actions/download-artifact@v4
with:
name: bindings-aarch64-apple-darwin
path: ${{ env.APP_NAME }}/artifacts
path: ${{ env.APP_PATH }}/artifacts
- name: Combine binaries
run: yarn universal
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bindings-universal-apple-darwin
path: "${{ env.APP_NAME }}/${{ env.APP_NAME }}.*.node"
path: ${{ env.APP_PATH }}/${{ env.APP_NAME }}.*.node
if-no-files-found: error
publish:
name: Publish
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rust-analyzer.linkedProjects": [
"modules/build/Cargo.toml"
]
}
7 changes: 0 additions & 7 deletions core/__test__/index.spec.mjs

This file was deleted.

6 changes: 0 additions & 6 deletions core/index.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions core/npm/android-arm-eabi/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions core/npm/android-arm64/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions core/npm/darwin-arm64/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions core/npm/darwin-universal/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions core/npm/darwin-x64/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions core/npm/freebsd-x64/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions core/npm/linux-arm64-gnu/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions core/npm/linux-x64-gnu/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions core/npm/linux-x64-musl/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions core/npm/win32-arm64-msvc/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions core/npm/win32-ia32-msvc/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions core/npm/win32-x64-msvc/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions core/src/lib.rs

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions core/Cargo.lock → modules/build/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core/Cargo.toml → modules/build/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "vsacode"
version = "0.0.0"
name = "build"
version = "0.6.0"

[lib]
crate-type = ["cdylib"]
Expand Down
5 changes: 5 additions & 0 deletions modules/build/__test__/index.spec.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import test from 'ava'

test('true is true', (t) => {
t.is(true, true)
})
File renamed without changes.
15 changes: 15 additions & 0 deletions modules/build/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* tslint:disable */
/* eslint-disable */

/* auto-generated by NAPI-RS */

export interface Env {
configPath?: string
cliArgs: Array<string>
home: string
vsixPath?: string
}
export declare function vsacode(env: Env): void
export declare class Config {
version: string
}
Loading

0 comments on commit d245e40

Please sign in to comment.