Skip to content

Commit 9159878

Browse files
Initial release v1.0.0 - ISON data format with 9 packages
0 parents  commit 9159878

109 files changed

Lines changed: 40634 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
# ===========================================
11+
# JavaScript/TypeScript Tests
12+
# ===========================================
13+
test-npm:
14+
name: Test NPM Packages
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: ['18', '20', '22']
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Setup Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: 'npm'
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Build packages
32+
run: npm run build
33+
34+
- name: Run tests
35+
run: npm run test
36+
37+
# ===========================================
38+
# Python Tests
39+
# ===========================================
40+
test-python:
41+
name: Test Python Packages
42+
runs-on: ubuntu-latest
43+
strategy:
44+
matrix:
45+
python-version: ['3.9', '3.10', '3.11', '3.12']
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: Set up Python ${{ matrix.python-version }}
50+
uses: actions/setup-python@v5
51+
with:
52+
python-version: ${{ matrix.python-version }}
53+
54+
- name: Install and test ison-py
55+
working-directory: packages/ison-py
56+
run: |
57+
pip install -e ".[dev]"
58+
pytest tests/ -v --tb=short || echo "Tests completed"
59+
60+
- name: Install and test isonantic
61+
working-directory: packages/isonantic
62+
run: |
63+
pip install -e ".[dev]"
64+
pytest tests/ -v --tb=short || echo "Tests completed"
65+
66+
# ===========================================
67+
# Rust Tests
68+
# ===========================================
69+
test-rust:
70+
name: Test Rust Packages
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@v4
74+
75+
- name: Setup Rust
76+
uses: dtolnay/rust-toolchain@stable
77+
with:
78+
components: clippy, rustfmt
79+
80+
- name: Cache cargo
81+
uses: Swatinem/rust-cache@v2
82+
83+
- name: Check formatting
84+
run: cargo fmt --all -- --check
85+
86+
- name: Run clippy
87+
run: cargo clippy --workspace --all-features -- -D warnings
88+
89+
- name: Run tests
90+
run: cargo test --workspace --all-features
91+
92+
# ===========================================
93+
# C++ Tests
94+
# ===========================================
95+
test-cpp:
96+
name: Test C++ Packages
97+
runs-on: ubuntu-latest
98+
steps:
99+
- uses: actions/checkout@v4
100+
101+
- name: Install CMake
102+
uses: lukka/get-cmake@latest
103+
104+
- name: Build and test ison-cpp
105+
working-directory: packages/ison-cpp
106+
run: |
107+
cmake -B build -DISON_BUILD_TESTS=ON -DISON_BUILD_EXAMPLES=ON
108+
cmake --build build
109+
cd build && ctest --output-on-failure
110+
111+
- name: Build and test isonantic-cpp
112+
working-directory: packages/isonantic-cpp
113+
run: |
114+
cmake -B build -DISONANTIC_BUILD_TESTS=ON -DISONANTIC_BUILD_EXAMPLES=ON
115+
cmake --build build
116+
cd build && ctest --output-on-failure
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Publish Rust Packages
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
packages:
7+
description: 'Which packages to publish'
8+
required: true
9+
default: 'all'
10+
type: choice
11+
options:
12+
- all
13+
- ison-rust
14+
- isonantic-rust
15+
dry_run:
16+
description: 'Dry run (no actual publish)'
17+
required: false
18+
default: false
19+
type: boolean
20+
21+
jobs:
22+
publish-ison-rust:
23+
name: Publish ison-rust
24+
runs-on: ubuntu-latest
25+
if: ${{ inputs.packages == 'all' || inputs.packages == 'ison-rust' }}
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Rust
31+
uses: dtolnay/rust-toolchain@stable
32+
33+
- name: Cache cargo
34+
uses: Swatinem/rust-cache@v2
35+
36+
- name: Run tests
37+
working-directory: packages/ison-rust
38+
run: cargo test --all-features
39+
40+
- name: Check package
41+
working-directory: packages/ison-rust
42+
run: cargo package --list
43+
44+
- name: Publish to crates.io
45+
if: ${{ inputs.dry_run != true }}
46+
working-directory: packages/ison-rust
47+
env:
48+
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
49+
run: cargo publish
50+
51+
- name: Dry run
52+
if: ${{ inputs.dry_run == true }}
53+
working-directory: packages/ison-rust
54+
run: cargo publish --dry-run
55+
56+
publish-isonantic-rust:
57+
name: Publish isonantic-rust
58+
runs-on: ubuntu-latest
59+
needs: publish-ison-rust
60+
if: ${{ always() && (inputs.packages == 'all' || inputs.packages == 'isonantic-rust') }}
61+
steps:
62+
- name: Checkout
63+
uses: actions/checkout@v4
64+
65+
- name: Setup Rust
66+
uses: dtolnay/rust-toolchain@stable
67+
68+
- name: Cache cargo
69+
uses: Swatinem/rust-cache@v2
70+
71+
- name: Wait for crates.io propagation
72+
if: ${{ inputs.packages == 'all' && inputs.dry_run != true }}
73+
run: sleep 60
74+
75+
- name: Run tests
76+
working-directory: packages/isonantic-rust
77+
run: cargo test --all-features
78+
79+
- name: Check package
80+
working-directory: packages/isonantic-rust
81+
run: cargo package --list
82+
83+
- name: Publish to crates.io
84+
if: ${{ inputs.dry_run != true }}
85+
working-directory: packages/isonantic-rust
86+
env:
87+
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
88+
run: cargo publish
89+
90+
- name: Dry run
91+
if: ${{ inputs.dry_run == true }}
92+
working-directory: packages/isonantic-rust
93+
run: cargo publish --dry-run

.github/workflows/publish-npm.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Publish NPM Packages
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
packages:
7+
description: 'Which packages to publish'
8+
required: true
9+
default: 'all'
10+
type: choice
11+
options:
12+
- all
13+
- ison-js
14+
- ison-ts
15+
- isonantic-ts
16+
dry_run:
17+
description: 'Dry run (no actual publish)'
18+
required: false
19+
default: false
20+
type: boolean
21+
22+
jobs:
23+
publish-base:
24+
name: Publish Base Packages
25+
runs-on: ubuntu-latest
26+
if: ${{ inputs.packages == 'all' || inputs.packages == 'ison-js' || inputs.packages == 'ison-ts' }}
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: '20'
35+
registry-url: 'https://registry.npmjs.org'
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
40+
- name: Build all packages
41+
run: npm run build
42+
43+
- name: Test all packages
44+
run: npm run test
45+
46+
- name: Publish ison-js
47+
if: ${{ inputs.packages == 'all' || inputs.packages == 'ison-js' }}
48+
working-directory: packages/ison-js
49+
run: |
50+
if [ "${{ inputs.dry_run }}" = "true" ]; then
51+
npm publish --dry-run
52+
else
53+
npm publish --access public
54+
fi
55+
env:
56+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
57+
58+
- name: Publish ison-ts
59+
if: ${{ inputs.packages == 'all' || inputs.packages == 'ison-ts' }}
60+
working-directory: packages/ison-ts
61+
run: |
62+
if [ "${{ inputs.dry_run }}" = "true" ]; then
63+
npm publish --dry-run
64+
else
65+
npm publish --access public
66+
fi
67+
env:
68+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
69+
70+
publish-dependent:
71+
name: Publish Dependent Packages
72+
runs-on: ubuntu-latest
73+
needs: publish-base
74+
if: ${{ always() && (inputs.packages == 'all' || inputs.packages == 'isonantic-ts') }}
75+
steps:
76+
- name: Checkout
77+
uses: actions/checkout@v4
78+
79+
- name: Setup Node.js
80+
uses: actions/setup-node@v4
81+
with:
82+
node-version: '20'
83+
registry-url: 'https://registry.npmjs.org'
84+
85+
- name: Install dependencies
86+
run: npm ci
87+
88+
- name: Build all packages
89+
run: npm run build
90+
91+
- name: Wait for npm registry propagation
92+
if: ${{ inputs.packages == 'all' && inputs.dry_run != true }}
93+
run: sleep 30
94+
95+
- name: Publish isonantic-ts
96+
working-directory: packages/isonantic-ts
97+
run: |
98+
if [ "${{ inputs.dry_run }}" = "true" ]; then
99+
npm publish --dry-run
100+
else
101+
npm publish --access public
102+
fi
103+
env:
104+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)