Skip to content

Commit

Permalink
chore: merge pull request #4 from websublime/feature/changed-packages
Browse files Browse the repository at this point in the history
feat: retrieve changed packages
  • Loading branch information
miguelramos committed Jul 8, 2024
2 parents a9f643c + 15b1cdd commit cfa32e3
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 50 deletions.
96 changes: 48 additions & 48 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,53 +129,53 @@ jobs:
name: bindings-${{ matrix.settings.target }}
path: "*.wasm"
if-no-files-found: error
build-freebsd:
runs-on: macos-13
name: Build FreeBSD
steps:
- uses: actions/checkout@v4
- name: Build
id: build
uses: cross-platform-actions/action@v0.24.0
env:
DEBUG: napi:*
RUSTUP_IO_THREADS: 1
with:
operating_system: freebsd
version: '13.2'
memory: 8G
cpu_count: 3
environment_variables: 'DEBUG RUSTUP_IO_THREADS'
shell: bash
run: |
sudo pkg install -y -f curl node libnghttp2 npm
sudo npm install -g corepack
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain beta
corepack prepare
corepack enable
source "$HOME/.cargo/env"
echo "~~~~ rustc --version ~~~~"
rustc --version
echo "~~~~ node -v ~~~~"
node -v
echo "~~~~ pnpm --version ~~~~"
pnpm --version
pwd
ls -lah
whoami
env
freebsd-version
pnpm install
pnpm build
rm -rf node_modules
rm -rf target
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bindings-freebsd
path: ${{ env.APP_NAME }}.*.node
if-no-files-found: error
#build-freebsd:
# runs-on: macos-13
# name: Build FreeBSD
# steps:
# - uses: actions/checkout@v4
# - name: Build
# id: build
# uses: cross-platform-actions/action@v0.24.0
# env:
# DEBUG: napi:*
# RUSTUP_IO_THREADS: 1
# with:
# operating_system: freebsd
# version: '13.2'
# memory: 8G
# cpu_count: 3
# environment_variables: 'DEBUG RUSTUP_IO_THREADS'
# shell: bash
# run: |
# sudo pkg install -y -f curl node libnghttp2 npm
# sudo npm install -g corepack
# curl https://sh.rustup.rs -sSf --output rustup.sh
# sh rustup.sh -y --profile minimal --default-toolchain beta
# corepack prepare
# corepack enable
# source "$HOME/.cargo/env"
# echo "~~~~ rustc --version ~~~~"
# rustc --version
# echo "~~~~ node -v ~~~~"
# node -v
# echo "~~~~ pnpm --version ~~~~"
# pnpm --version
# pwd
# ls -lah
# whoami
# env
# freebsd-version
# pnpm install
# pnpm build
# rm -rf node_modules
# rm -rf target
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: bindings-freebsd
# path: ${{ env.APP_NAME }}.*.node
# if-no-files-found: error
test-macOS-windows-binding:
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
needs:
Expand Down Expand Up @@ -319,7 +319,7 @@ jobs:
name: Publish
runs-on: ubuntu-latest
needs:
- build-freebsd
#- build-freebsd
- test-macOS-windows-binding
- test-linux-binding
#- test-wasi
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ crate-type = ["cdylib"]
[dependencies]
napi-derive = "2.16.8"
napi = { version = "2.16.7", default-features = false, features = ["napi9", "serde-json", "tokio_rt"] }
workspace-node-tools = "0.6.0"
workspace-node-tools = "0.7.1"

[build-dependencies]
napi-build = "2"
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"aarch64-unknown-linux-gnu",
"i686-pc-windows-msvc",
"armv7-unknown-linux-gnueabihf",
"x86_64-unknown-freebsd",
"aarch64-unknown-linux-musl",
"aarch64-pc-windows-msvc"
]
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ pub fn monorepo_packages() -> Vec<PackageInfo> {
Monorepo::get_packages()
}

#[napi(js_name = "getMonorepoChangedPackages")]
pub fn monorepo_changed_packages(sha: Option<String>) -> Vec<PackageInfo> {
Monorepo::get_changed_packages(sha)
}

#[napi(js_name = "executeFetchAll")]
pub fn git_fetch_all(cwd: Option<String>) -> bool {
Git::fetch_all(cwd).is_ok()
Expand Down

0 comments on commit cfa32e3

Please sign in to comment.