-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
3 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
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,149 @@ | ||
name: Github Release | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
# test_unit_js: | ||
# name: 🧪 Unit Tests JavaScript | ||
# runs-on: ubuntu-24.04 | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: actions/setup-node@v4 | ||
# - uses: ./.github/actions/rust-toolchain | ||
# - uses: Swatinem/rust-cache@v2 | ||
# with: { shared-key: "${{ runner.os }}" } | ||
# - run: yarn | ||
# - run: yarn build-native-release && yarn build | ||
# - run: yarn test:js:unit | ||
|
||
# test_unit_rs: | ||
# name: 🧪 Unit Tests Rust | ||
# runs-on: ubuntu-24.04 | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: actions/setup-node@v4 | ||
# - uses: ./.github/actions/rust-toolchain | ||
# - uses: Swatinem/rust-cache@v2 | ||
# with: { shared-key: "${{ runner.os }}" } | ||
# - run: yarn | ||
# - run: yarn build-native-release && yarn build | ||
# - run: yarn test:rs:unit | ||
|
||
# test_integration: | ||
# name: 🧪 Integration Tests | ||
# runs-on: ubuntu-24.04 | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: actions/setup-node@v4 | ||
# - uses: ./.github/actions/rust-toolchain | ||
# - uses: Swatinem/rust-cache@v2 | ||
# with: { shared-key: "${{ runner.os }}" } | ||
# - run: yarn | ||
# - run: yarn build-native-release && yarn build | ||
# - run: yarn test:integration | ||
|
||
# lint_and_format: | ||
# name: 📝 Lint & Format | ||
# runs-on: ubuntu-24.04 | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: actions/setup-node@v4 | ||
# - uses: ./.github/actions/rust-toolchain | ||
# with: { components: "clippy, rustfmt" } | ||
# - uses: Swatinem/rust-cache@v2 | ||
# with: { shared-key: "${{ runner.os }}" } | ||
# - run: yarn --frozen-lockfile | ||
# - run: yarn build-native-release && yarn build | ||
# - run: yarn lint | ||
|
||
build_native: | ||
strategy: | ||
matrix: | ||
config: | ||
- name: 🐥 Linux AMD64 | ||
os: linux | ||
arch: amd64 | ||
runner: ubuntu-24.04 | ||
|
||
- name: 🐥 Linux ARM64 | ||
os: linux | ||
arch: arm64 | ||
runner: ubuntu-24.04-arm | ||
|
||
- name: 🍎 MacOS AMD64 | ||
os: macos | ||
arch: amd64 | ||
runner: macos-13 | ||
|
||
- name: 🍎 MacOS ARM64 | ||
os: macos | ||
arch: arm64 | ||
runner: macos-15 | ||
|
||
# - name: 🟦 Windows AMD64 | ||
# os: windows | ||
# arch: amd64 | ||
# runner: windows-latest | ||
|
||
name: ${{ matrix.config.name }} | ||
runs-on: ${{ matrix.config.runner }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- uses: ./.github/actions/rust-toolchain | ||
- run: yarn --frozen-lockfile | ||
- run: yarn build-native-release | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.config.os }}-${{ matrix.config.arch }} | ||
path: ${{ github.workspace }}/packages/core/rust/*.node | ||
if-no-files-found: error | ||
retention-days: 1 | ||
|
||
build_flow: | ||
name: 🔨 Build Flow | ||
runs-on: ubuntu-24.04 | ||
needs: ["build_native"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: { path: "${{ github.workspace }}/packages/core/rust" } | ||
- run: yarn --frozen-lockfile | ||
- run: yarn build | ||
- run: yarn build-ts | ||
|
||
|
||
publish-github-release: | ||
name: "🔄 Publish Github Release" | ||
runs-on: ubuntu-24.04 | ||
needs: | ||
# - test_unit_js | ||
# - test_unit_rs | ||
# - test_integration | ||
# - lint_and_format | ||
- build_flow | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: { path: artifacts } | ||
- name: Publish` Github Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
set -e | ||
TAG="$(date -u +"v%Y.%m.%d.%H%M").${GITHUB_SHA::4}" | ||
echo "Tag: ${TAG}" | ||
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
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,49 @@ | ||
set -e | ||
|
||
PATH_SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
PATH_ROOT=$(dirname $PATH_SCRIPT) | ||
|
||
cd $PATH_ROOT/.. | ||
|
||
rm -rf atlaspack-bin | ||
|
||
tar \ | ||
--exclude './atlaspack/benchmarks' \ | ||
--exclude './atlaspack/.parcel-cache' \ | ||
--exclude './atlaspack/.git' \ | ||
--exclude './atlaspack/target' \ | ||
--exclude './atlaspack/packages/core/integration-tests' \ | ||
--exclude './atlaspack/packages/examples' \ | ||
--exclude './atlaspack/packages/migrations' \ | ||
--exclude './atlaspack/packages/docs' \ | ||
--exclude './atlaspack/packages/flow-libs' \ | ||
--exclude './atlaspack/packages/flow-typed' \ | ||
--exclude './atlaspack/packages/patches' \ | ||
--exclude './atlaspack/packages/dev/repl' \ | ||
--exclude './atlaspack/packages/utils/atlaspackforvscode' \ | ||
--exclude './atlaspack/crates' \ | ||
-J -cvf \ | ||
./atlaspack.tar.xz ./atlaspack | ||
|
||
# ll ./atlaspack-bin | ||
# tar -czf ./atlaspack.tar.gz ./atlaspack-bin | ||
du -sh --apparent-size ./atlaspack.tar.xz | ||
|
||
|
||
tar \ | ||
--exclude './atlaspack/benchmarks' \ | ||
--exclude './atlaspack/.parcel-cache' \ | ||
--exclude './atlaspack/.git' \ | ||
--exclude './atlaspack/target' \ | ||
--exclude './atlaspack/packages/core/integration-tests' \ | ||
--exclude './atlaspack/packages/examples' \ | ||
--exclude './atlaspack/packages/migrations' \ | ||
--exclude './atlaspack/packages/docs' \ | ||
--exclude './atlaspack/packages/flow-libs' \ | ||
--exclude './atlaspack/packages/flow-typed' \ | ||
--exclude './atlaspack/packages/patches' \ | ||
--exclude './atlaspack/packages/dev/repl' \ | ||
--exclude './atlaspack/packages/utils/atlaspackforvscode' \ | ||
--exclude './atlaspack/crates' \ | ||
-J -cf \ | ||
./atlaspack-${{ matrix.config.os }}-${{ matrix.config.arch }}.tar.xz ./atlaspack |