Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Flash committed Dec 6, 2024
1 parent f157d05 commit 8027dd9
Show file tree
Hide file tree
Showing 20 changed files with 281 additions and 273 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ env:
GITHUB_ACTION_RUN_NUMBER: ${{ github.run_number }}

jobs:
test:
collect-data:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -54,13 +56,19 @@ jobs:
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add ./webapp/public/*.gz
git add ./webapp/public/*
git add ./repos.txt
git commit -m "Update data" || echo "No changes to commit"
git commit -m "Update data for ${{ matrix.os }}" || echo "No changes to commit"
- name: Push changes
run: git push

deploy:
needs: collect-data
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
Expand All @@ -77,7 +85,9 @@ jobs:
run: |
pnpm run build
sed -i '' 's|="/assets|="/moon-build-dashboard/assets|g' ./dist/index.html
sed -i '' 's|"/latest_data.jsonl.gz"|"/moon-build-dashboard/latest_data.jsonl.gz"|g' ./dist/assets/*.js
sed -i '' 's|"/linux/latest_data.jsonl.gz"|"/moon-build-dashboard/linux/latest_data.jsonl.gz"|g' ./dist/assets/*.js
sed -i '' 's|"/windows/latest_data.jsonl.gz"|"/moon-build-dashboard/windows/latest_data.jsonl.gz"|g' ./dist/assets/*.js
sed -i '' 's|"/mac/latest_data.jsonl.gz"|"/moon-build-dashboard/mac/latest_data.jsonl.gz"|g' ./dist/assets/*.js
working-directory: ./webapp

- name: Deploy to GitHub Pages
Expand Down
149 changes: 0 additions & 149 deletions repos.txt
Original file line number Diff line number Diff line change
@@ -1,151 +1,2 @@
https://github.com/moonbitlang/core main
https://github.com/moonbitlang/x main
https://github.com/gmlewis/moonbit-fonts master
https://github.com/trancee/wasmSID main
https://github.com/moonbitlang/minimoonbit-public main

# generated list to test mooncakes on mooncakes.io
A-23187/encoding 0.1.0
CAIMEOX/feat-moon 0.2.0
CAIMEOX/list 0.1.0
CAIMEOX/quickcheck 0.6.9
CAIMEOX/state 0.1.0
CAIMEOX/t 0.1.0
CMoonBack/Binary-Exponentiation 0.1.0
CMoonBack/computational-geometry 0.1.0
CMoonBack/string-Algorithm 0.1.0
Guest0x0/HAMT 0.2.1
Guest0x0/dregex 0.2.5
Howardzhangdqs/md5 0.9.3
Kaida-Amethyst/math 0.1.2
Lampese/moonbit-chalk 0.3.2
PerfectPan/base64 0.1.1
SyoujyoujiNaiki/chungshan 0.2.0
Yoorkin/ArgParser 0.1.7
Yoorkin/example/list 0.1.4
Yoorkin/format 0.1.5
Yoorkin/hello 0.1.3
Yoorkin/prettyprinter 0.4.0
Yoorkin/rabbit-tea 0.2.8
Yoorkin/stack 0.1.4
Yoorkin/trie 0.2.2
Yu-zh/either 0.1.0
YumeCross/schema 0.4.3
bob/aegis 0.1.0
bobzhang/sexp 0.1.1
bobzhang/testa 0.1.0
bobzhang/testb 0.1.0
bzy-debug/cowsay 0.1.0
bzy-debug/cowsay_lib 0.1.0
bzy-debug/hello 0.1.20240510+81e045f4e
chawyehsu/punycode 0.0.3
eczn/eczn-utils 0.2.0
enjoecn/easy 0.1.0
enjoecn/gb 0.1.1
extism/moonbit-pdk 0.36.0
fantix/mmhttp 0.3.0
fantix/muts 0.5.4
five-nuts/coreutils 0.1.3
gmlewis/b2 0.27.0
gmlewis/base64 0.11.0
gmlewis/crc32 0.6.0
gmlewis/flate 0.31.0
gmlewis/fonts 0.2.0
gmlewis/fonts-a 0.2.0
gmlewis/fonts-b 0.2.0
gmlewis/fonts-c 0.2.0
gmlewis/fonts-d 0.2.0
gmlewis/fonts-e 0.2.0
gmlewis/fonts-f 0.2.0
gmlewis/fonts-g 0.2.0
gmlewis/fonts-h 0.2.0
gmlewis/fonts-i 0.2.0
gmlewis/fonts-j 0.2.0
gmlewis/fonts-k 0.2.0
gmlewis/fonts-l 0.2.0
gmlewis/fonts-m 0.2.0
gmlewis/fonts-o 0.2.0
gmlewis/fonts-p 0.2.0
gmlewis/fonts-q 0.2.0
gmlewis/fonts-r 0.2.0
gmlewis/fonts-s 0.2.0
gmlewis/fonts-t 0.2.0
gmlewis/fonts-u 0.2.0
gmlewis/fonts-v 0.2.0
gmlewis/fonts-w 0.2.0
gmlewis/fonts-y 0.2.0
gmlewis/fonts-z 0.2.0
gmlewis/gzip 0.25.0
gmlewis/hash 0.14.0
gmlewis/image 0.12.0
gmlewis/io 0.16.0
gmlewis/json 0.15.0
gmlewis/jsonutil 0.24.0
gmlewis/md5 0.15.0
gmlewis/moonbit-pdk 0.44.0
gmlewis/sha1 0.6.0
gmlewis/sha256 0.13.0
gmlewis/spin-moonbit-sdk 0.45.0
gmlewis/zlib 0.14.0
hackwaly/common 0.1.24
hackwaly/moonyacc 0.1.11
jankin_li/Learn_Test1 0.1.0
jankin_li/new_lib 0.1.0
jedisct1/aegis 0.2.1
jumpping/baby 0.2.0
kinoamyfx/moon-axe-tools 0.0.1-SNAPSHOT
lijunchen/unstable_io 0.1.3
loneoutpost/core-extra 0.0.6
lucifer1004/mooncake 0.1.0
mizchi/js_io 0.1.1
mizchi/js_regexp 0.0.4
mizchi/json 0.4.0
mizchi/protocol 0.0.5
moonbit-courses/minimoonbit-courses 0.1.0
moonbit-js-ffi/js 0.2.0
moonbitlang/arduino 0.0.1
moonbitlang/core 0.1.20241204+f941da9e9
moonbitlang/quickcheck 0.6.9
moonbitlang/std 0.1.0
moonbitlang/wasm4 0.2.4
moonbitlang/x 0.4.13
myfreess/myers-diff 0.1.0
oboard/mimetype 0.1.4
oboard/mocket 0.2.0
oboard/moonbit-eval 0.1.5
oboard/mooncrypto 0.1.8
oboard/moonetx 0.1.5
oboard/numoon 0.3.2
peter-jerry-ye/advent_of_code 0.3.1-fix
peter-jerry-ye/assertion 0.2.1
peter-jerry-ye/canvas 0.4.0
peter-jerry-ye/json 0.4.0
peter-jerry-ye/memory 0.8.4
peter-jerry-ye/parser-combinator 0.9.1
peter-jerry-ye/utils 0.1.0
peter-jerry-ye/wasi 0.18.0
rami3l/cmark 0.1.5
suiyunonghen/datetime 0.1.2
suiyunonghen/linklist 0.1.7
suiyunonghen/moonvalue 0.1.8
suiyunonghen/wasmMemManager 0.1.2
summer-boythink/moonorm 0.1.0
tiye/cirru-edn 0.0.3
tiye/cirru-parser 0.0.9
tiye/dom-ffi 0.0.6
tiye/lexicon-fractional-index 0.0.2
tiye/respo 0.0.18
tmkx/hello 0.0.0
tonyfettes/memory 0.1.5
tonyfettes/narray 0.1.0
tonyfettes/torch 0.2.5
wangziling/hello 0.0.1
wstreet/moontest 0.1.0
xunyoyo/linalg 0.2.4
xunyoyo/permutation 0.1.3
yamajik/dapr 0.1.5
yamajik/wasi 0.1.22
yamajik/wasi-bindings 0.2.1
yangqing/hello 0.2.2
yj-qin/regexp 0.3.2
zxch3n/expect 0.3.1
17 changes: 8 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,16 @@ fn main0() -> anyhow::Result<()> {
let res = match cli.subcommand {
cli::MoonBuildDashBoardSubcommands::Stat(cmd) => stat(cmd),
};
#[cfg(target_os = "windows")]
let os = "windows";
#[cfg(target_os = "linux")]
let os = "linux";
#[cfg(target_os = "macos")]
let os = "macos";
match res {
Ok(dashboard) => {
let date = Local::now().format("%Y-%m-%d");
let filename = format!("webapp/public/{}_data.jsonl.gz", date);
let filename = format!("webapp/public/{}/{}_data.jsonl.gz", os, date);

let fp = std::fs::OpenOptions::new()
.create(true)
Expand All @@ -451,7 +457,7 @@ fn main0() -> anyhow::Result<()> {
writer.flush()?;
writer.into_inner()?.finish()?;

let latest_filename = "webapp/public/latest_data.jsonl.gz";
let latest_filename = format!("webapp/public/{}/latest_data.jsonl.gz", os);
std::fs::copy(&filename, latest_filename)?;

Ok(())
Expand All @@ -463,10 +469,3 @@ fn main0() -> anyhow::Result<()> {
fn main() -> anyhow::Result<()> {
main0()
}

#[test]
fn test_main() {
use chrono::Local;
let date = Local::now().format("%Y-%m-%d");
println!("{}", date);
}
3 changes: 2 additions & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"react-router-dom": "^7.0.2"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
Expand Down
57 changes: 57 additions & 0 deletions webapp/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
Binary file added webapp/public/mac/2024-11-29_data.jsonl.gz
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added webapp/public/mac/latest_data.jsonl.gz
Binary file not shown.
Binary file added webapp/public/windows/2024-11-29_data.jsonl.gz
Binary file not shown.
Binary file added webapp/public/windows/latest_data.jsonl.gz
Binary file not shown.
Loading

0 comments on commit 8027dd9

Please sign in to comment.