This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
-
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
a23e0a2
commit 353cb4a
Showing
17 changed files
with
297 additions
and
3,433 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,5 +1,3 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: "Build Windows/ Linux / ARM macOS" | ||
|
||
# Controls when the workflow will run | ||
|
@@ -11,7 +9,7 @@ on: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
build-linux: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
|
@@ -25,36 +23,127 @@ jobs: | |
run: yarn install | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: Build for Windows | ||
run: yarn run build-binaries-electron:win32 | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: Build for Linux | ||
run: yarn run build-binaries-electron:linux | ||
|
||
- name: Build binaries | ||
run: yarn run build-ci | ||
|
||
- name: Compress x86 build | ||
uses: a7ul/[email protected] | ||
id: compress | ||
with: | ||
command: c | ||
cwd: ./prebuilds/linux/ | ||
files: | | ||
./index.node | ||
outPath: cider_utils-v0.1.5-napi-v6-linux-x64.tar.gz | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: Upload a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
# Artifact name | ||
name: linux | ||
# A file, directory or wildcard pattern that describes what to upload | ||
path: ./*.tar.gz | ||
|
||
build-windows: | ||
# The type of runner that the job will run on | ||
runs-on: windows-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
|
||
# Runs a single command using the runners shell | ||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: Build for macOS (x86-64) | ||
run: yarn run build-binaries-electron:darwin | ||
- name: Build binaries | ||
run: yarn run build-ci | ||
- name: Compress x86 build | ||
uses: a7ul/[email protected] | ||
id: compress | ||
with: | ||
command: c | ||
cwd: ./prebuilds/win32/ | ||
files: | | ||
./index.node | ||
outPath: cider_utils-v0.1.5-napi-v6-win32-x64.tar.gz | ||
# Runs a set of commands using the runners shell | ||
- name: Upload a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
# Artifact name | ||
name: windows | ||
# A file, directory or wildcard pattern that describes what to upload | ||
path: ./*.tar.gz | ||
|
||
build-macos: | ||
# The type of runner that the job will run on | ||
runs-on: macos-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
|
||
# Runs a single command using the runners shell | ||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: Build for macOS (ARM) | ||
run: yarn run build-binaries-electron2 | ||
- name: Build binaries | ||
run: yarn run build-ci | ||
|
||
- name: Move to arm | ||
run: rustup target add aarch64-apple-darwin | ||
|
||
- name: Build binaries | ||
run: yarn run build-ci-m1 | ||
|
||
- name: Create universal node module | ||
run: mkdir ./prebuilds/mac-universal; lipo -create -output ./prebuilds/mac-universal/index.node ./prebuilds/mac-arm/index.node ./prebuilds/mac-x86/index.node | ||
- name: Compress universal build | ||
uses: a7ul/[email protected] | ||
id: compress2 | ||
with: | ||
command: c | ||
cwd: ./prebuilds/mac-universal/ | ||
files: | | ||
./index.node | ||
outPath: cider_utils-v0.1.5-napi-v6-darwin-x64.tar.gz | ||
- name: Compress universal build | ||
uses: a7ul/[email protected] | ||
id: compress | ||
with: | ||
command: c | ||
cwd: ./prebuilds/mac-universal/ | ||
files: | | ||
./index.node | ||
outPath: cider_utils-v0.1.5-napi-v6-darwin-arm64.tar.gz | ||
# Runs a set of commands using the runners shell | ||
- name: Upload a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
# Artifact name | ||
name: Artifacts | ||
name: macos | ||
# A file, directory or wildcard pattern that describes what to upload | ||
path: prebuilds/ | ||
|
||
path: ./*.tar.gz | ||
|
||
final: | ||
runs-on: ubuntu-latest | ||
needs: [build-linux, build-macos, build-windows] | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
|
||
- name: Display structure of downloaded files | ||
run: ls -R | ||
|
||
- name: Release Artifact | ||
uses: marvinpinto/[email protected] | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "v0.2.0" | ||
automatic_release_tag: "v0.1.5" | ||
prerelease: false | ||
files: prebuilds/ | ||
|
||
|
||
files: ./**/*.tar.gz |
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,22 +1,12 @@ | ||
build/ | ||
taglib/ | ||
prebuilds/ | ||
|
||
# IDEs | ||
.vs/ | ||
.vscode/ | ||
.idea/ | ||
|
||
# Node | ||
node_modules/ | ||
Debug/ | ||
Release/ | ||
|
||
# Debug shit | ||
.cache | ||
shit/ | ||
|
||
# Other stuff | ||
target | ||
index.node | ||
**/node_modules | ||
**/.DS_Store | ||
npm-debug.log* | ||
.history/ | ||
*.flac | ||
*.lock | ||
package-lock.json | ||
*.m4a | ||
*.aac | ||
build/config.gypi |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
[package] | ||
name = "cider_utils" | ||
version = "0.1.5" | ||
license = "AGPL-3.0" | ||
edition = "2021" | ||
exclude = ["index.node"] | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
lofty = "0.7.1" | ||
base64 = "0.13.0" | ||
walkdir = "2.3.2" | ||
|
||
[dependencies.neon] | ||
version = "0.10.1" | ||
default-features = false | ||
features = ["napi-runtime"] |
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,9 +1,7 @@ | ||
# cider_utils | ||
Modules written in Rust to accelerate CPU bound workloads on the Client-Side of Cider app. | ||
|
||
Modules written in C to accelerate CPU bound workloads on the Client-Side of Cider app. | ||
|
||
*Assuming you know how to set up a C development environment.* | ||
*Assuming you know how to set up a Rust development environment.* | ||
|
||
Usage: | ||
`yarn` to build `index.node` which is the node facing module. | ||
To access the module, import `index.js`, which will give you functions `parseFile` and `recursiveFolderSearch`. | ||
`npm install` to build `index.node` which is the node facing module. |
Oops, something went wrong.