Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdragon-001 committed Jun 16, 2023
1 parent c74a87e commit e1715c9
Showing 1 changed file with 45 additions and 39 deletions.
84 changes: 45 additions & 39 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
workflow_call:

env:
GO_VERSION: 1.16
NODE_VERSION: "18.x"

jobs:
Expand Down Expand Up @@ -42,26 +41,27 @@ jobs:
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: Install tauri dependencies
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends cmake libgtk-3-dev libwebkit2gtk-4.1-dev librsvg2-dev libayatana-appindicator3-dev libssl-dev libjavascriptcoregtk-4.1-dev

- name: Rust setup
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

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


- name: Install dependencies
run: apt update && 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: Download axolotl-web build artifacts
uses: actions/download-artifact@v3
id: download
Expand All @@ -71,15 +71,12 @@ jobs:

- name: Copy axolotl-web build artifacts
run: |
echo $PWD
mkdir --parents axolotl-web/dist
cp -rf ${{steps.download.outputs.download-path}}/* axolotl-web/dist
- name: Build
run: |
ls axolotl-web
echo $PWD
make build-axolotl
cargo build --release --features tauri
- name: Upload build artifacts
uses: actions/upload-artifact@v3
Expand All @@ -88,8 +85,8 @@ jobs:
path: axolotl
retention-days: 1

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

steps:
Expand All @@ -101,9 +98,6 @@ jobs:
- 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

Expand All @@ -113,57 +107,69 @@ jobs:
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-axolotl-web-deb-arm64
name: build-axolotl-web-arm64
path: axolotl-web/dist/
retention-days: 1

build-axolotl-deb-arm64:
name: Build axolotl Debian arm64
build-axolotl-arm64:
name: Build axolotl arm64
runs-on: ubuntu-latest
container: debian
needs:
- build-axolotl-web-deb-arm64
- build-axolotl-web-arm64
env:
DEBIAN_FRONTEND: noninteractive
TZ: Europe/Berlin
HOST_CC: gcc
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
CXX_aarch64_unknown_linux_gnu: aarch64-linux-gnu-g++
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
PKG_CONFIG_ALLOW_CROSS: 1
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
PKG_CONFIG_SYSROOT_DIR: /
steps:
- name: Install Rust
run: rustup update stable

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

- name: Install cross-compilation tools
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: aarch64-unknown-linux-gnu
- name: Install tools
run: |
sudo apt-get update && sudo apt-get install -y ca-certificates curl
- name: Install tauri arm64 dependencies
run: |
dpkg --add-architecture arm64
apt update && apt-get install -y libgtk-3-dev:arm64 libwebkit2gtk-4.1-dev:arm64 librsvg2-dev:arm64 libayatana-appindicator3-dev:arm64 libssl-dev:arm64 libjavascriptcoregtk-4.1-dev:arm64
sudo dpkg --add-architecture arm64
sudo sed -i '/^deb \[/! s/^deb /deb [arch=amd64] /' /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy main multiverse universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy-security main multiverse universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main multiverse universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main multiverse universe" | sudo tee -a /etc/apt/sources.list
sudo apt-get update && sudo apt-get install -y --no-install-recommends cmake libgtk-3-dev:arm64 libwebkit2gtk-4.1-dev:arm64 librsvg2-dev:arm64 libayatana-appindicator3-dev:arm64 libssl-dev:arm64 libjavascriptcoregtk-4.1-dev:arm64
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: aarch64-unknown-linux-gnu

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

- name: Setup C compiler, linker and pkgconfig
run: |
sudo apt-get install -y g++ g++-aarch64-linux-gnu
- name: Check out code
uses: actions/checkout@v3

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

- name: Copy axolotl-web build artifacts
run: |
echo $PWD
mkdir --parents axolotl-web/dist
cp -rf ${{steps.download-axolotl-web.outputs.download-path}}/* axolotl-web/dist
- name: Build
run: RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" cargo build --release --target aarch64-unknown-linux-gnu --features tauri
run: cargo build --release --target aarch64-unknown-linux-gnu --features tauri

- name: Upload build artifacts
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit e1715c9

Please sign in to comment.