Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 53 additions & 38 deletions .github/workflows/upload.yaml
Original file line number Diff line number Diff line change
@@ -1,63 +1,75 @@
name: Try to upload
name: Upload

on:
push:
branches:
- main
pull_request: {}

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.0.0

- uses: actions/setup-node@v3
- name: Check out repository
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
node-version: 16
cache: 'yarn'
persist-credentials: false

- name: ACTIONS_ALLOW_UNSECURE_COMMANDS
id: ACTIONS_ALLOW_UNSECURE_COMMANDS
run: echo 'ACTIONS_ALLOW_UNSECURE_COMMANDS=true' >> $GITHUB_ENV
- name: Set up Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: 24
package-manager-cache: false

- name: add cr
- name: Enable Corepack
run: |
mkdir -p $GITHUB_WORKSPACE/bin
wget -O $GITHUB_WORKSPACE/bin/cr https://github.com/calcit-lang/calcit/releases/download/0.6.20/cr
chmod +x $GITHUB_WORKSPACE/bin/cr
echo "::add-path::$GITHUB_WORKSPACE/bin"
corepack enable
corepack prepare yarn@4.12.0 --activate
yarn --version

- 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/calcit-lang/recollect.git
&& git clone https://github.com/Respo/respo.calcit.git
&& git clone https://github.com/Respo/respo-ui.calcit.git
&& git clone https://github.com/Respo/respo-message.calcit.git
&& git clone https://github.com/Respo/respo-markdown.calcit.git
&& git clone https://github.com/Cumulo/cumulo-util.calcit.git
&& git clone https://github.com/Cumulo/cumulo-reel.calcit.git
&& git clone https://github.com/mvc-works/ws-edn.calcit.git
&& git clone https://github.com/Respo/respo-feather.calcit.git
&& git clone https://github.com/Respo/alerts.calcit.git
&& git clone https://github.com/calcit-lang/bisection-key.git
&& git clone https://github.com/calcit-lang/calcit-wss.git
&& git clone https://github.com/calcit-lang/calcit.std.git
- name: Set up Calcit and Caps
uses: calcit-lang/setup-calcit@704b3f5cd6f9ce3bd1e0c926dbdd1d181adb8180 # v1.4.0
with:
tools: calcit,caps

- run: cr --entry server --emit-ir -1
- name: Resolve immutable dependencies
run: |
set -euo pipefail
caps --strict --ci
yarn install --immutable
caps verify --toolchain

- run: yarn && yarn compile-page && yarn release-page
- name: Validate Calcit upgrade
run: |
set -euo pipefail
calcit calcit.cirru edit format
git diff --exit-code -- calcit.cirru
calcit calcit.cirru --check-only
calcit calcit.cirru --entry server --check-only
calcit calcit.cirru analyze quality --baseline config/calcit-quality.cirru
calcit calcit.cirru analyze dynamic-methods --max 0
calcit calcit.cirru --entry server analyze dynamic-methods --max 0
calcit calcit.cirru analyze deprecated --summary-only
calcit calcit.cirru --entry server analyze deprecated --summary-only

- run: mkdir -p dist-server && cp compact.cirru dist-server && cp package.json dist-server/
name: Copy server scripts
- name: Build web and server artifacts
run: |
set -euo pipefail
calcit calcit.cirru js
yarn vite build --base=./
calcit calcit.cirru --entry server ir
mkdir -p dist-server
cp js-out/program-ir.cirru dist-server/compact.cirru
cp calcit.cirru deps.cirru package.json dist-server/


- name: Upload web assets
id: deploy
uses: Pendect/action-rsyncer@v2.0.0
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: Pendect/action-rsyncer@2554a1e574cf229fb144f23ea5971dbdca8ae8e3 # v1.1.0
env:
DEPLOY_KEY: ${{secrets.rsync_private_key}}
with:
Expand All @@ -68,11 +80,13 @@ jobs:
dest: 'rsync-user@tiye.me:/web-assets/repo/${{ github.repository }}'

- name: Display status from deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: echo "${{ steps.deploy.outputs.status }}"

- name: Upload server script
id: deploy-server
uses: Pendect/action-rsyncer@v2.0.0
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: Pendect/action-rsyncer@2554a1e574cf229fb144f23ea5971dbdca8ae8e3 # v1.1.0
env:
DEPLOY_KEY: ${{secrets.rsync_private_key}}
with:
Expand All @@ -83,4 +97,5 @@ jobs:
dest: 'rsync-user@tiye.me:/servers/tabletwo/'

- name: Display status from deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: echo "${{ steps.deploy-server.outputs.status }}"
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

js-out/
node_modules/
.calcit/
.yarn/*.gz
dist-server/
dist/
out-page/

Expand All @@ -12,5 +15,3 @@ yarn-error.log

storage.cirru
backups/

dist-server
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
Loading