Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add zola slug strategy #1419

Merged
merged 38 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2f75001
add zola slug strategy
float3 Apr 26, 2024
3311e91
make it build and use the same version zola uses
float3 Apr 27, 2024
674b50d
I don't think we need the async experiment
float3 Apr 27, 2024
04d817f
fix: make it compile and work with dirty hack
float3 Apr 30, 2024
d229020
fix: fix indentation
float3 Apr 30, 2024
047b76e
fix: update test.yml to match main.yml
float3 Apr 30, 2024
8b1ea9d
fix: fix workflows
float3 Apr 30, 2024
5124120
fix: remove unused dependency
float3 Apr 30, 2024
6f88a90
fix: add repository field to cargo toml
float3 Apr 30, 2024
e0cbcf3
chore: update deprecated actions
float3 Apr 30, 2024
800e148
fix: fix regression so it builds again
float3 Apr 30, 2024
098ce95
add tmp folders to gitignore
float3 Apr 30, 2024
ff7054e
fix: fix workflows, globs don't expand in github actions
float3 Apr 30, 2024
bea6b37
fix: set shell variables correctly
float3 Apr 30, 2024
3d544a6
fix: use find instead of ld
float3 Apr 30, 2024
e17aff9
fix: forgot to use $env:
float3 Apr 30, 2024
a80e053
fix: try export
float3 Apr 30, 2024
fe1278e
fix:dont't use pwsh
float3 Apr 30, 2024
147a144
test
float3 Apr 30, 2024
292a785
fix: i don't know how to test the wasm using the test suite because i…
float3 Apr 30, 2024
55b392f
test
float3 Apr 30, 2024
1e720c9
test
float3 Apr 30, 2024
80e8211
this should work now and produces working extensions
float3 Apr 30, 2024
8562567
fix: make test suite work hopefully
float3 Apr 30, 2024
463944f
fix: ok now it should really really work
float3 Apr 30, 2024
b45691f
fix: make webpack copy the wasm module to the correct path
float3 May 3, 2024
1fc79d9
fix: remove unnecessary command in ci
float3 May 3, 2024
620fb86
fix: remove unnecessary stuff
float3 May 3, 2024
bc35243
correctly slugfiy anchors
float3 May 3, 2024
6d6028d
test in release mode to avoid second compilation
float3 May 3, 2024
22c6539
move wasm initialization to a better place
float3 May 4, 2024
2b91bf7
wait for wasm to import
float3 May 4, 2024
b661692
adding a while loop doesn't work so we just have to fail the first time?
float3 May 4, 2024
d1eb51e
this might fail the first time but it's the best solution I can come …
float3 May 6, 2024
cc39c01
move this inside the switch statement
float3 May 6, 2024
cdf7816
since import takes only a few milliseconds on 3 year old hardware we …
float3 May 6, 2024
7423658
do error handling
float3 May 6, 2024
b12d4dc
add some comments
float3 May 6, 2024
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
33 changes: 22 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,43 +26,54 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: "Setup Node.js environment"
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "14"
node-version: "20"
cache: "npm"

- name: Setup Rust Toolchain for GitHub CI
uses: actions-rust-lang/[email protected]

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: "Install dependencies"
run: |
npm run build-wasm
npm ci
npm install -g vsce@"^2.5"

# Our prepublish script runs in production mode by default.
# We should run tests against debug build to make error messages as useful as possible.
- name: "Build"
shell: pwsh
- name: "Build release"
run: |
vsce package --pre-release
$env:NODE_ENV = 'development'
vsce package --pre-release --out debug.vsix
npx vsce package --pre-release

export NODE_ENV='development'
npx vsce package --pre-release --out debug.vsix

- name: Test
uses: GabrielBB/[email protected]
with:
run: npm test

- name: "Rust test"
run: |
cd ./src/zola-slug/
cargo test --release

- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Markdown-All-in-One-${{ github.sha }}
path: ./*.vsix

# If the run failed, npm log may help to diagnose.
- name: "(debug) Upload npm log"
if: ${{ !success() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: "npm-debug-log"
path: "~/.npm/_logs"
26 changes: 18 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,43 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: "Setup Node.js environment"
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "14"
node-version: "20"
cache: "npm"

- name: Setup Rust Toolchain for GitHub CI
uses: actions-rust-lang/[email protected]

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: "Install dependencies"
run: |
npm run build-wasm
npm ci
npm install -g vsce@"^2.5"

- name: "Build debug"
shell: pwsh
run: |
$env:NODE_ENV = 'development'
vsce package --out debug.vsix
export NODE_ENV='development'
npx vsce package --pre-release --out debug.vsix

- name: Test
uses: GabrielBB/[email protected]
with:
run: npm test

- name: "Rust test"
run: |
cd ./src/zola-slug/
cargo test --release

- name: "(debug) Upload npm log"
if: ${{ !success() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: "npm-debug-log"
path: "~/.npm/_logs"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ tmp

# The welcome materials
/welcome/**
/changes.md
/changes.md
Loading
Loading