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

ci(create-farm): add support for freebsd #1770

Merged
merged 19 commits into from
Nov 13, 2024
Merged
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
5 changes: 5 additions & 0 deletions .changeset/young-oranges-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-farm": patch
---

Add arch support for `freebsd-x64`
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
test -f ./rust-plugins/react/npm/${abi}/index.farm
test -f ./rust-plugins/sass/npm/${abi}/index.farm
done
for abi in android-arm-eabi linux-arm-gnueabihf android-arm64
for abi in android-arm-eabi linux-arm-gnueabihf android-arm64 freebsd-x64
do
mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi}
test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node
Expand All @@ -58,8 +58,8 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
version: pnpm run bump
publish: npm run release
version: pnpm bump
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/rust-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,54 @@ jobs:
with:
name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-sass
path: rust-plugins/sass/npm/${{ matrix.settings.abi }}/index.farm
# Now for create-farm cli only builds
build-freebsd:
name: Build and Upload Artifacts - x86_64-unknown-freebsd
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
id: build
uses: cross-platform-actions/[email protected]
env:
DEBUG: napi:*
RUSTUP_IO_THREADS: 1
with:
operating_system: freebsd
version: '14.0'
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 pnpm
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain beta
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

echo "~~~~ Install dependencies ~~~~"
cd packages/create-farm && pnpm i --frozen-lockfile --ignore-scripts
echo "~~~~ Build ~~~~"
pnpm build --target x86_64-unknown-freebsd
echo "~~~~ ls -lah ~~~~"
ls -lah

rm -rf node_modules
rm -rf target
- name: Upload Create Farm Rust
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}-x86_64-unknown-freebsd-create-farm
path: ./packages/create-farm/create-farm.freebsd-x64.node
Loading