Skip to content

Commit 5f55d2a

Browse files
feat: Add initial implementation of Svelte calculator component
1 parent 818a48f commit 5f55d2a

File tree

182 files changed

+24432
-0
lines changed

Some content is hidden

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

182 files changed

+24432
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: Swatinem/[email protected]
18+
- name: Build
19+
run: cargo build --verbose
20+
- name: Run tests
21+
run: cargo test --verbose
22+
23+
build_wasm:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@master
27+
- uses: Swatinem/[email protected]
28+
- uses: actions-rs/toolchain@v1
29+
with:
30+
profile: minimal
31+
toolchain: stable
32+
target: wasm32-unknown-unknown
33+
default: true
34+
- run: cd kalk; cargo build --target wasm32-unknown-unknown --no-default-features
Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
name: Release
2+
3+
on:
4+
create:
5+
tags:
6+
- 'v*' # Version tag
7+
workflow_dispatch:
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
14+
publish:
15+
name: publish to crates.io
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@master
19+
- uses: Swatinem/[email protected]
20+
- name: Publish crate
21+
continue-on-error: true
22+
run: cargo publish --manifest-path kalk/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
23+
- name: Publish CLI
24+
run: sleep 20 && cargo publish --manifest-path cli/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
25+
26+
publish_npm:
27+
name: publish to npm
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@master
31+
- uses: Swatinem/[email protected]
32+
- uses: actions/setup-node@v1
33+
with:
34+
node-version: 14
35+
registry-url: https://registry.npmjs.org/
36+
- name: Install wasm-pack
37+
run: cargo install wasm-pack
38+
- name: Build
39+
run: |
40+
yarn install
41+
cd kalk
42+
wasm-pack build --scope paddim8 -- --no-default-features
43+
cd ..
44+
- uses: JS-DevTools/npm-publish@v1
45+
with:
46+
token: ${{ secrets.NPM_TOKEN }}
47+
package: ./kalk/pkg/package.json
48+
access: public
49+
50+
publish_kalk_web:
51+
name: publish kalk_web
52+
if: always()
53+
runs-on: ubuntu-latest
54+
needs: [publish_npm]
55+
steps:
56+
- uses: actions/checkout@master
57+
- uses: actions/setup-node@v1
58+
with:
59+
node-version: 14
60+
registry-url: https://registry.npmjs.org/
61+
- name: build
62+
run: |
63+
cd web
64+
npm install
65+
cd ..
66+
- uses: JS-DevTools/npm-publish@v1
67+
with:
68+
token: ${{ secrets.NPM_TOKEN }}
69+
package: ./web/package.json
70+
access: public
71+
72+
release_linux:
73+
name: release linux
74+
runs-on: ubuntu-latest
75+
steps:
76+
- uses: actions/checkout@master
77+
- uses: Swatinem/[email protected]
78+
- name: Compile
79+
run: |
80+
cargo build --release --verbose
81+
mkdir build
82+
cp target/release/kalker build/kalker-linux
83+
- uses: actions/upload-artifact@v4
84+
with:
85+
name: linux
86+
path: build/kalker-linux
87+
88+
release_mac:
89+
name: release mac
90+
runs-on: macos-latest
91+
steps:
92+
- uses: actions/checkout@master
93+
- uses: actions/cache@v2
94+
with:
95+
path: |
96+
~/.cargo/registry/index
97+
~/.cargo/registry/cache
98+
target
99+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
100+
- name: Compile
101+
run: |
102+
cargo build --release --verbose
103+
mkdir build
104+
zip -r build/kalker-macOS.zip target/release/kalker
105+
- uses: actions/upload-artifact@v4
106+
with:
107+
name: macOS
108+
path: build/kalker-macOS.zip
109+
110+
release_windows:
111+
name: release windows
112+
runs-on: windows-latest
113+
114+
steps:
115+
- uses: actions/checkout@master
116+
- uses: actions/cache@v2
117+
with:
118+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
119+
path: |
120+
C:\Users\runneradmin\.cargo\bin\cargo-wix
121+
C:\Users\runneradmin\.cargo\registry\index
122+
C:\Users\runneradmin\.cargo\registry\cache
123+
C:\Users\runneradmin\.cargo\registry\cache
124+
{FOLDERID_LocalAppData}\gmp-mpfr-sys
125+
D:\a\kalker\kalker\target
126+
C:\msys64\home\paddi\kalker\target
127+
- uses: msys2/setup-msys2@v2
128+
with:
129+
update: true
130+
install: >-
131+
base-devel
132+
pacman-mirrors
133+
diffutils
134+
m4
135+
make
136+
mingw-w64-x86_64-gcc
137+
mingw-w64-x86_64-rust
138+
continue-on-error: true
139+
- shell: msys2 {0}
140+
run: |
141+
cargo build --release --verbose
142+
143+
- uses: crazy-max/ghaction-chocolatey@v1
144+
with:
145+
args: install wixtoolset -y
146+
- shell: msys2 {0}
147+
run: |
148+
[ ! -f /c/Users/runneradmin/.cargo/bin/cargo-wix.exe ] && cargo install cargo-wix --version 0.3.1
149+
cd cli
150+
cargo wix --no-build --nocapture
151+
mkdir ../build
152+
mv target/wix/*.msi ../build/kalker-windows.msi
153+
- uses: actions/upload-artifact@v4
154+
with:
155+
name: win64
156+
path: build/kalker-windows.msi
157+
158+
release_android:
159+
name: release android
160+
if: false
161+
runs-on: ubuntu-latest
162+
needs: [publish_kalk_web]
163+
defaults:
164+
run:
165+
working-directory: ./mobile
166+
167+
steps:
168+
- uses: actions/checkout@master
169+
- uses: actions/cache@v2
170+
with:
171+
path: |
172+
mobile/android/.gradle
173+
mobile/android/build
174+
mobile/android/app/build
175+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
176+
- name: npm
177+
run: |
178+
npm install
179+
npm run build
180+
- name: build app
181+
run: |
182+
npx cap sync
183+
cd android
184+
version=$(cat ../../web/package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
185+
APP_VERSION_NAME=$version ./gradlew assembleRelease
186+
- name: Setup build tool version variable
187+
shell: bash
188+
run: |
189+
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
190+
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
191+
echo Last build tool version is: $BUILD_TOOL_VERSION
192+
- uses: r0adkll/sign-android-release@v1
193+
name: sign apk
194+
with:
195+
releaseDirectory: mobile/android/app/build/outputs/apk/release
196+
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
197+
alias: ${{ secrets.ALIAS }}
198+
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
199+
keyPassword: ${{ secrets.KEY_PASSWORD }}
200+
env:
201+
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
202+
- run: |
203+
mkdir ../build
204+
mv $(ls -Art android/app/build/outputs/apk/release/*.apk | tail -n 1) ../build/kalker-android.apk
205+
- uses: actions/upload-artifact@v4
206+
with:
207+
name: android
208+
path: build/kalker-android.apk
209+
210+
create_release:
211+
name: Create Release
212+
if: always()
213+
needs: [release_linux, release_mac, release_windows]
214+
runs-on: ubuntu-latest
215+
permissions: write-all
216+
steps:
217+
- uses: actions/checkout@master
218+
- name: Download Artifact
219+
uses: actions/download-artifact@v4
220+
with:
221+
path: build
222+
merge-multiple: true
223+
- name: Upload Assets
224+
env:
225+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
226+
run: gh release create ${{ github.ref_name }} build/*

monorepo/project-rust-1/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
target
2+
*/target
3+
kalk/Cargo.lock
4+
cli/Cargo.lock
5+
cli/test
6+
.vscode/
7+
result*

monorepo/project-rust-1/.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

monorepo/project-rust-1/.idea/encodings.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

monorepo/project-rust-1/.idea/kalker.iml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

monorepo/project-rust-1/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

monorepo/project-rust-1/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)