Skip to content

Commit

Permalink
ci: use axolotl web build for axolotl
Browse files Browse the repository at this point in the history
  • Loading branch information
nanu-c committed Jun 14, 2023
1 parent 0ba8667 commit d1dcf91
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 97 deletions.
205 changes: 108 additions & 97 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,69 @@ env:
NODE_VERSION: "18.x"

jobs:
build-axolotl-web:
name: Build axolotl-web
runs-on: ubuntu-latest

steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Check out code
uses: actions/checkout@v3

- name: Download dependencies
run: npm --prefix ./axolotl-web ci --loglevel verbose

- name: Run tests
run: npm --prefix ./axolotl-web test

- name: Lint application
run: npm --prefix ./axolotl-web run lint

- name: Analyze npm dependencies
run: npm --prefix ./axolotl-web run depcheck

- name: Build
run: npm --prefix ./axolotl-web run build

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: axolotl-web
path: axolotl-web/dist/
retention-days: 1
build-axolotl:
name: Build axolotl
runs-on: ubuntu-latest

needs:
- build-axolotl-web
steps:
- name: Rust setup
uses: dtolnay/rust-toolchain@stable

- name: Rust cache
uses: swatinem/rust-cache@v2

- name: Download axolotl-web build artifacts
uses: actions/download-artifact@v3
with:
path: build-artifacts

- name: Install dependencies
run: sudo apt update && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev librsvg2-dev libayatana-appindicator3-dev libssl-dev libjavascriptcoregtk-4.1-dev cmake


- name: Check out code
uses: actions/checkout@v3

- name: Copy axolotl-web build artifacts
run: |
mkdir --parents $GITHUB_WORKSPACE/axolotl-web/dist
cp --recursive $GITHUB_WORKSPACE/build-artifacts/axolotl-web/dist $GITHUB_WORKSPACE/axolotl-web/dist
cp --recursive $GITHUB_WORKSPACE/build-artifacts/guis $GITHUB_WORKSPACE/guis
- name: Build
run: make build-axolotl
Expand All @@ -36,99 +82,64 @@ jobs:
path: axolotl
retention-days: 1

# build-axolotl-web:
# name: Build axolotl-web
# runs-on: ubuntu-latest

# steps:
# - name: Setup Node
# uses: actions/setup-node@v3
# with:
# node-version: ${{ env.NODE_VERSION }}

# - name: Check out code
# uses: actions/checkout@v3

# - name: Download dependencies
# run: npm --prefix ./axolotl-web ci --loglevel verbose

# - name: Run tests
# run: npm --prefix ./axolotl-web test

# - name: Lint application
# run: npm --prefix ./axolotl-web run lint

# - name: Analyze npm dependencies
# run: npm --prefix ./axolotl-web run depcheck

# - name: Build
# run: npm --prefix ./axolotl-web run build

# - name: Upload build artifacts
# uses: actions/upload-artifact@v3
# with:
# name: axolotl-web
# path: axolotl-web/dist/
# retention-days: 1

# build-axolotl-deb-arm64:
# name: Build axolotl Debian arm64
# runs-on: ubuntu-latest

# steps:
# - name: Install Rust
# run: rustup update stable
# - name: Install cross-compilation tools
# uses: taiki-e/setup-cross-toolchain-action@v1
# with:
# target: aarch64-unknown-linux-gnu

# - name: Rust cache
# uses: swatinem/rust-cache@v2

# - name: Check out code
# uses: actions/checkout@v3

# - name: Build
# run: cargo build --release --target aarch64-unknown-linux-gnu --features tauri

# - name: Upload build artifacts
# uses: actions/upload-artifact@v3
# with:
# name: linux-arm64
# path: build/linux-arm64/axolotl
# retention-days: 1

# build-axolotl-web-deb-arm64:
# name: Build axolotl-web Debian arm64
# runs-on: ubuntu-latest

# steps:
# - name: Set up Node
# uses: actions/setup-node@v3
# with:
# node-version: ${{ env.NODE_VERSION }}

# - name: Check out code
# uses: actions/checkout@v3

# - name: Create folder
# run: mkdir --parents $GITHUB_WORKSPACE/build/linux-arm64/axolotl-web

# - name: Download dependencies
# run: npm --prefix ./axolotl-web --target_arch=arm64 ci --loglevel verbose

# - name: Build
# run: npm --prefix ./axolotl-web --target_arch=arm64 run build

# - name: Copy build files
# run: |
# cp --recursive $GITHUB_WORKSPACE/axolotl-web/dist $GITHUB_WORKSPACE/build/linux-arm64/axolotl-web/
# cp --recursive $GITHUB_WORKSPACE/guis $GITHUB_WORKSPACE/build/linux-arm64/

# - name: Upload build artifacts
# uses: actions/upload-artifact@v3
# with:
# name: linux-arm64
# path: build/linux-arm64/
# retention-days: 1
build-axolotl-deb-arm64:
name: Build axolotl Debian arm64
runs-on: ubuntu-latest

steps:
- name: Install Rust
run: rustup update stable
- name: Install cross-compilation tools
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: aarch64-unknown-linux-gnu

- name: Rust cache
uses: swatinem/rust-cache@v2

- name: Check out code
uses: actions/checkout@v3

- name: Build
run: cargo build --release --target aarch64-unknown-linux-gnu --features tauri

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: linux-arm64
path: build/linux-arm64/axolotl
retention-days: 1

build-axolotl-web-deb-arm64:
name: Build axolotl-web Debian arm64
runs-on: ubuntu-latest

steps:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Check out code
uses: actions/checkout@v3

- name: Create folder
run: mkdir --parents $GITHUB_WORKSPACE/build/linux-arm64/axolotl-web

- name: Download dependencies
run: npm --prefix ./axolotl-web --target_arch=arm64 ci --loglevel verbose

- name: Build
run: npm --prefix ./axolotl-web --target_arch=arm64 run build

- name: Copy build files
run: |
cp --recursive $GITHUB_WORKSPACE/axolotl-web/dist $GITHUB_WORKSPACE/build/linux-arm64/axolotl-web/
cp --recursive $GITHUB_WORKSPACE/guis $GITHUB_WORKSPACE/build/linux-arm64/
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: linux-arm64
path: build/linux-arm64/
retention-days: 1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ libzkgroup*.so
# Added by cargo

/target
/bin

0 comments on commit d1dcf91

Please sign in to comment.