generated from calcit-lang/respo-calcit-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Memkits/updates
doing workflow updates
- Loading branch information
Showing
7 changed files
with
2,875 additions
and
2,055 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 |
---|---|---|
|
@@ -10,33 +10,21 @@ jobs: | |
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: ACTIONS_ALLOW_UNSECURE_COMMANDS | ||
id: ACTIONS_ALLOW_UNSECURE_COMMANDS | ||
run: echo 'ACTIONS_ALLOW_UNSECURE_COMMANDS=true' >> $GITHUB_ENV | ||
|
||
- name: add cr | ||
run: | | ||
mkdir -p $GITHUB_WORKSPACE/bin | ||
wget -O $GITHUB_WORKSPACE/bin/cr https://github.com/calcit-lang/calcit/releases/download/0.6.1/cr | ||
chmod +x $GITHUB_WORKSPACE/bin/cr | ||
echo "::add-path::$GITHUB_WORKSPACE/bin" | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'yarn' | ||
|
||
- name: "prepare modules" | ||
run: > | ||
mkdir -p ~/.config/calcit/modules/ && cd ~/.config/calcit/modules/ | ||
&& git clone https://github.com/calcit-lang/lilac.git | ||
&& git clone https://github.com/calcit-lang/memof.git | ||
&& git clone https://github.com/Respo/respo.calcit.git | ||
&& git clone https://github.com/Respo/reel.calcit.git | ||
&& git clone https://github.com/Respo/respo-markdown.calcit.git | ||
&& git clone https://github.com/Respo/respo-ui.calcit.git | ||
- uses: calcit-lang/[email protected] | ||
with: | ||
bundler: false | ||
|
||
- name: "compiles to js" | ||
run: > | ||
cr --emit-js -1 | ||
&& (cd js-out/ && ln -s ../assets/bitwise.js .) | ||
caps --ci && cr --once js | ||
&& cp assets/bitwise.js js-out/ | ||
&& yarn && yarn vite build --base=./ | ||
- name: Deploy to server | ||
|
@@ -50,6 +38,3 @@ jobs: | |
ssh_options: '' | ||
src: 'dist/*' | ||
dest: '[email protected]:/web-assets/repo/${{ github.repository }}' | ||
|
||
- name: Display status from deploy | ||
run: echo "${{ steps.deploy.outputs.status }}" |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,11 @@ | ||
|
||
{} | ||
:calcit-version |0.9.5 | ||
:dependencies $ {} | ||
|calcit-lang/lilac |main | ||
|calcit-lang/memof |main | ||
|Respo/respo.calcit |main | ||
|Respo/reel.calcit |main | ||
|Respo/alerts.calcit |main | ||
|Respo/respo-markdown.calcit |main | ||
|Respo/respo-ui.calcit |main |
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,32 @@ | ||
|
||
export function binary_to_hex(binary) { | ||
// validation input | ||
if (!/^[01]+$/.test(binary) || binary.length % 4 !== 0) { | ||
throw new Error("Invalid binary string"); | ||
} | ||
|
||
let hex = ""; | ||
for (let i = 0; i < binary.length; i += 4) { | ||
const chunk = binary.slice(i, i + 4); | ||
const decimal = Number.parseInt(chunk, 2); | ||
hex += decimal.toString(16); | ||
} | ||
|
||
return hex.toLowerCase(); | ||
} | ||
|
||
export function hex_to_binary(hex) { | ||
// validation input | ||
if (!/^[0-9A-Fa-f]+$/.test(hex)) { | ||
throw new Error("Invalid hexadecimal string"); | ||
} | ||
|
||
let binary = ""; | ||
for (let i = 0; i < hex.length; i++) { | ||
const decimal = Number.parseInt(hex[i], 16); | ||
const chunk = decimal.toString(2).padStart(4, "0"); | ||
binary += chunk; | ||
} | ||
|
||
return binary; | ||
} |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"dependencies": { | ||
"@calcit/procs": "^0.6.1", | ||
"copy-text-to-clipboard": "^3.0.1" | ||
"@calcit/procs": "^0.9.5", | ||
"copy-text-to-clipboard": "^3.2.0" | ||
}, | ||
"devDependencies": { | ||
"vite": "^3.0.3" | ||
"vite": "^5.4.10" | ||
}, | ||
"version": "0.0.1" | ||
} |
Oops, something went wrong.