From 8c2e142b2c354c8ae5044b4efe2b088b05701694 Mon Sep 17 00:00:00 2001 From: Ebernn Date: Tue, 11 Mar 2025 23:50:30 +0100 Subject: [PATCH 1/5] =?UTF-8?q?=E2=9C=A8=20Moderately=20add=20extra=20symb?= =?UTF-8?q?ols?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/simulation/SimulationCanvas.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulation/SimulationCanvas.tsx b/src/simulation/SimulationCanvas.tsx index cc57b79..1b09f2b 100644 --- a/src/simulation/SimulationCanvas.tsx +++ b/src/simulation/SimulationCanvas.tsx @@ -118,7 +118,7 @@ fn fs_main(@builtin(position) fragCoord: vec4) -> @location(0) vec4 { const extraSymbols = [60, 62, 123, 125, 43, 45, 44, 46, 91, 93]; for (let i = 0; i < props.dimensions ** 2; i++) for (let j = 0; j < tapeLength; j++) { - // if (Math.random() < 0.8) continue; + if (Math.random() < 0.8) continue; const randomIndex = Math.floor(Math.random() * tapeLength); initialTape[i * tapeLength + randomIndex] = extraSymbols[Math.floor(Math.random() * extraSymbols.length)]; From 095bb035892ac2f85a9959794bd7537a57b21817 Mon Sep 17 00:00:00 2001 From: Ebernn Date: Tue, 11 Mar 2025 23:54:38 +0100 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=94=A7=20GitHub=20Pages=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 51 ++++++++++++++++++++++++++++++++++++ vite.config.ts | 7 ++--- 2 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..640e85d --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,51 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main", "dev/gh-pages"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + - name: Install dependencies + run: npm ci + - name: Build + run: npm run build + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload dist folder + path: "./dist" + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/vite.config.ts b/vite.config.ts index 9ff59a1..e8e4644 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,12 +1,13 @@ -import { defineConfig } from 'vite'; -import solidPlugin from 'vite-plugin-solid'; +import { defineConfig } from "vite"; +import solidPlugin from "vite-plugin-solid"; export default defineConfig({ + base: "/webgpu-self-replicating-programs/", plugins: [solidPlugin()], server: { port: 3000, }, build: { - target: 'esnext', + target: "esnext", }, }); From 3e79e50178832b91676c910f4e196187df9af393 Mon Sep 17 00:00:00 2001 From: Ebernn Date: Wed, 12 Mar 2025 00:18:43 +0100 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=94=A7=20Deploy=20from=20main=20only?= =?UTF-8?q?=20if=20tests=20pass?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 640e85d..dfd11c5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,7 +4,7 @@ name: Deploy static content to Pages on: # Runs on pushes targeting the default branch push: - branches: ["main", "dev/gh-pages"] + branches: ["*"] # Run tests on all branches # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -21,8 +21,26 @@ concurrency: cancel-in-progress: true jobs: - # Single deploy job since we're just deploying + # Job to run tests before deploying + test: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + - name: Install dependencies + run: npm ci + - name: Run tests + run: npm run test + + # Deploy job, only runs if tests pass deploy: + needs: test # Ensures tests pass before deploying + if: github.ref == 'refs/heads/main' # Deploy only from main environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} From 090c4435237c87e7718375d25fc91cf3661303be Mon Sep 17 00:00:00 2001 From: Ebernn Date: Wed, 12 Mar 2025 00:28:00 +0100 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=93=9D=20Name,=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dfd11c5..3624965 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,5 +1,5 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages +# Simple workflow for running tests on all branches and deploying only from main +name: Test and Deploy to GitHub Pages on: # Runs on pushes targeting the default branch From 82ddabbed4b0ea18cc06fb8b27b1e4c2d1623cbd Mon Sep 17 00:00:00 2001 From: Ebernn Date: Wed, 12 Mar 2025 00:32:18 +0100 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=90=9B=20Fix=20broken=20branch=20filt?= =?UTF-8?q?er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3624965..7c3e064 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,7 +4,8 @@ name: Test and Deploy to GitHub Pages on: # Runs on pushes targeting the default branch push: - branches: ["*"] # Run tests on all branches + branches: + - "**" # Match all branches # Allows you to run this workflow manually from the Actions tab workflow_dispatch: