From 281d5fe7665f44d8cb824a640ef2ba00df18766d Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 24 Dec 2023 17:11:10 +0700 Subject: [PATCH] ci: migrate `FreeBSD` build to `cross-platform-actions` (#19) --- .github/workflows/CI.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1bda247..6d0e6e0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -163,31 +163,29 @@ jobs: - uses: actions/checkout@v3 - name: Build id: build - uses: vmactions/freebsd-vm@v0 + uses: cross-platform-actions/action@v0.21.0 env: DEBUG: napi:* - RUSTUP_HOME: /usr/local/rustup - CARGO_HOME: /usr/local/cargo RUSTUP_IO_THREADS: 1 with: - envs: DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS - usesh: true - mem: 3000 - prepare: | - pkg install -y -f curl node libnghttp2 - curl -qL https://www.npmjs.com/install.sh | sh - npm install --location=global --ignore-scripts yarn + operating_system: freebsd + version: '13.2' + memory: 13G + 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 yarn --ignore-scripts curl https://sh.rustup.rs -sSf --output rustup.sh sh rustup.sh -y --profile minimal --default-toolchain beta - export PATH="/usr/local/cargo/bin:$PATH" + source "$HOME/.cargo/env" echo "~~~~ rustc --version ~~~~" rustc --version echo "~~~~ node -v ~~~~" node -v echo "~~~~ yarn --version ~~~~" yarn --version - run: | - export PATH="/usr/local/cargo/bin:$PATH" pwd ls -lah whoami @@ -195,8 +193,6 @@ jobs: freebsd-version yarn install yarn build - strip -x *.node - yarn test rm -rf node_modules rm -rf target rm -rf .yarn/cache