Skip to content

Commit 8cf2b73

Browse files
authored
Merge branch 'main' into activation
2 parents 25ec8cb + 80755a0 commit 8cf2b73

File tree

102 files changed

+2666
-10252
lines changed

Some content is hidden

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

102 files changed

+2666
-10252
lines changed

.envrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintignore

Lines changed: 0 additions & 18 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/build.yaml

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
name: Build anura
1+
name: CI
22

3-
on: [push]
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
48

59
jobs:
610
build:
11+
name: Build Anura
712
runs-on: ubuntu-latest
8-
913
steps:
1014
- uses: actions/checkout@v4
1115
- name: Use Node.js
@@ -17,9 +21,66 @@ jobs:
1721
- run: git submodule update --init
1822
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
1923
- run: source "$HOME/.cargo/env" && make static
20-
- run: zip -r anura.zip static/
21-
- uses: actions/upload-artifact@v4
24+
25+
- name: Upload Anura Artifact
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: Anura static build
29+
path: static/*
30+
retention-days: 90
31+
32+
upload:
33+
name: Upload release
34+
runs-on: ubuntu-latest
35+
needs: build
36+
permissions: write-all
37+
if: github.ref == 'refs/heads/main'
38+
39+
steps:
40+
- name: Delete old release and tag
41+
uses: dev-drprasad/[email protected]
42+
with:
43+
delete_release: true
44+
tag_name: latest
45+
github_token: ${{ github.token }}
46+
47+
- name: Get artifacts
48+
uses: actions/download-artifact@v4
2249
with:
2350
name: Anura static build
24-
path: anura.zip
25-
retention-days: 2
51+
path: ./static
52+
53+
- name: Zip anura Release
54+
run: cd static && zip -r ../anura.zip . && cd ..
55+
56+
- name: Release to GitHub
57+
uses: ncipollo/release-action@v1
58+
with:
59+
name: Continuous Build
60+
tag: latest
61+
commit: main
62+
body: "${{ github.event.head_commit.url }} ${{ github.event.head_commit.message }}"
63+
artifacts: "anura.zip"
64+
prerelease: true
65+
66+
pages:
67+
name: Upload to Github Pages
68+
runs-on: ubuntu-latest
69+
needs: build
70+
permissions: write-all
71+
if: github.ref == 'refs/heads/main'
72+
steps:
73+
- name: Get artifacts
74+
uses: actions/download-artifact@v4
75+
with:
76+
name: Anura static build
77+
path: ./static
78+
79+
- name: upload pages artifact
80+
uses: actions/upload-pages-artifact@v3
81+
with:
82+
path: "./static"
83+
84+
- name: deploy to github
85+
id: deployment
86+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ server/passkey
2727
package-lock.json
2828
.direnv
2929
result
30+
anuraos-types/
3031
public/config.json
3132
static/
32-
x86_image_wizard/alpine/anurad.c
33+
x86_image_wizard/alpine/anura-run
3334
x86_image_wizard/alpine/xfrog.sh
3435
x86_image_wizard/alpine/xsetrandr.sh
3536
x86_image_wizard/alpine/anuramouse

.gitpod.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.prettierrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @type {import("prettier").Config}
3+
*/
4+
const config = {
5+
tabWidth: 4,
6+
trailingComma: "all",
7+
semi: true,
8+
singleQuote: false,
9+
};
10+
11+
export default config;

.prettierrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

Makefile

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ RUST_FILES=$(shell find v86/src/rust/ -name '*.rs') \
55
v86/src/rust/gen/jit.rs v86/src/rust/gen/jit0f.rs \
66
v86/src/rust/gen/analyzer.rs v86/src/rust/gen/analyzer0f.rs
77

8-
all: submodules build/bootstrap v86dirty v86 build/libs/nfsadapter/nfsadapter.js build/libs/mime/mime.iife.js build/libs/filer/filer.min.js build/libs/comlink/comlink.min.mjs build/libs/workbox/version build/libs/fflate/browser.js bundle public/config.json build/cache-load.json apps/libfileview.lib/icons build/bin/chimerix.ajs build/libs/libcurl/version build/libs/bare-mux/bare.cjs build/uv/uv.bundle.js build/libs/idb-keyval/idb-keyval.js build/assets/matter.css build/libs/dreamland/all.js
8+
all: submodules build/bootstrap \
9+
v86 build/libs/filer/filer.min.js build/libs/mime/mime.iife.js build/libs/nfsadapter/nfsadapter.js build/libs/comlink/comlink.min.mjs build/libs/workbox/version build/libs/idb-keyval/idb-keyval.js \
10+
bundle public/config.json build/cache-load.json build/libs/fflate/browser.js apps/libfileview.lib/icons \
11+
build/bin/chimerix.ajs build/libs/libcurl/version build/libs/bare-mux/bare.cjs build/uv/uv.bundle.js build/assets/matter.css build/libs/dreamland/all.js \
912

1013
full: all rootfs-alpine
1114

@@ -147,9 +150,6 @@ build/lib/v86.wasm: $(RUST_FILES) v86/build/softfloat.o v86/build/zstddeclib.o v
147150
cd v86; make build/v86.wasm
148151
cp v86/build/v86.wasm build/lib/v86.wasm
149152

150-
v86dirty:
151-
touch v86timestamp # makes it "dirty" and forces recompilation
152-
153153
build/cache-load.json: FORCE
154154
(find apps/ -type f && cd build/ && find lib/ -type f && find libs/ -type f && find uv/ -type f && find assets/ -type f && find bundle.css -type f && cd ../public/ && find . -type f)| grep -v -e node_modules -e \.map -e \.d\.ts -e "/\." -e "uv/" -e "workbox/" | jq -Rnc '[inputs]' > build/cache-load.json
155155

@@ -162,10 +162,20 @@ watch: bundle FORCE
162162
bundle: tsc css lint milestone
163163
mkdir -p build/artifacts
164164

165+
ANURA_VERSION = $(shell jq -r '.version' package.json)
166+
165167
tsc:
166168
mkdir -p build/artifacts
167169
cp -r src/* build/artifacts
168170
npx tsc
171+
mkdir -p anuraos-types
172+
cd anuraos-types/; \
173+
mkdir -p lib/
174+
cd build/; \
175+
(find lib -type f -name "*.d.ts" -exec cp --parents {} ../anuraos-types/ \;)
176+
(cd build && find lib -type f -name "*.d.ts") | sed 's/ \+/\n/g' | sed 's|.*|/// <reference path="&" />|' > anuraos-types/index.d.ts
177+
jq '.version = "$(ANURA_VERSION)"' types-package.json > anuraos-types/package.json
178+
169179
css: src/*.css
170180
# shopt -s globstar; cat src/**/*.css | npx postcss --use autoprefixer -o build/bundle.css
171181
shopt -s globstar; cat src/**/*.css > build/bundle.css
@@ -185,7 +195,7 @@ static: all
185195
cp -r public/* static/
186196

187197
server: FORCE
188-
cd server; npx ts-node server.ts
198+
cd server; node server.js
189199

190200
# v86 imports
191201
v86/src/rust/gen/jit.rs:

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ Anura shows as more of a proof-of-concept with what's possible on the modern web
6262
- Make sure you have `Docker` installed and running.
6363
- Run `make rootfs`
6464
- Make sure to add yourself to the Docker group using `usermod -a -G docker $USER`
65-
- (Special Use Case) In the event that you should need to override/manually add the initrd and kernel, remember to keep track of the file names of initrd and vmlinuz in build/images/(rootfs)-boot/. Then, copy them to the Anura root directory and rename them to initrd.img and bzimage respectively.(See the extended instructions [here](./documentation/Kernel_Override.md).)
6665

6766
### Running Anura Locally
6867

0 commit comments

Comments
 (0)