Skip to content

Commit

Permalink
swap
Browse files Browse the repository at this point in the history
  • Loading branch information
waozixyz committed Jan 22, 2025
1 parent f9d7af5 commit e0c4c84
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ on:
pull_request:
branches: [ axis ]

env:
EM_VERSION: '3.1.74' # Specify the Emscripten version
EM_CACHE_FOLDER: 'emsdk-cache' # Folder to cache Emscripten SDK and system libraries

jobs:
build-and-deploy:
runs-on: ubuntu-latest
Expand All @@ -20,34 +16,23 @@ jobs:
with:
submodules: 'recursive'

# Step 2: Set up Nix
# Step 2: Install Nix
- name: Install Nix
uses: cachix/install-nix-action@v24
with:
extra_nix_config: |
experimental-features = nix-command flakes
# Step 3: Set up Emscripten with caching
- name: Cache Emscripten SDK and system libraries
id: cache-emsdk
uses: actions/cache@v3
with:
path: ${{ env.EM_CACHE_FOLDER }}
key: emsdk-${{ env.EM_VERSION }}-${{ runner.os }}-${{ hashFiles('**/xmake.lua') }}
restore-keys: |
emsdk-${{ env.EM_VERSION }}-${{ runner.os }}-
emsdk-${{ env.EM_VERSION }}-
- name: Set up Emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ env.EM_VERSION }}
actions-cache-folder: ${{ env.EM_CACHE_FOLDER }}
# Step 3: Set up Emscripten using Nix
- name: Set up Emscripten with Nix
run: |
nix-env -iA nixpkgs.emscripten
# Step 4: Install xmake using Nix
- name: Install xmake with Nix
# Step 4: Install xmake directly
- name: Install xmake
run: |
nix-env -iA nixpkgs.xmake
wget https://xmake.io/shget.text -O - | bash
source ~/.xmake/profile
# Step 5: Build for Web (WASM)
- name: Build for Web (WASM)
Expand Down

0 comments on commit e0c4c84

Please sign in to comment.