From 1011c3a1c067bf965d798f9402bf4076342b1758 Mon Sep 17 00:00:00 2001 From: Minigrim0 Date: Thu, 16 May 2024 12:50:38 +0200 Subject: [PATCH] run actions on ubuntu for faster building --- .github/sources.list | 52 ++++++++++++++++++++++++++++++++++ .github/workflows/build.yml | 56 ++++++++++++++++++------------------- 2 files changed, 79 insertions(+), 29 deletions(-) create mode 100644 .github/sources.list diff --git a/.github/sources.list b/.github/sources.list new file mode 100644 index 0000000..eee84ec --- /dev/null +++ b/.github/sources.list @@ -0,0 +1,52 @@ +# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to +# newer versions of the distribution. +deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted +# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted + +## Major bug fix updates produced after the final release of the +## distribution. +deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted +# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted + +## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu +## team. Also, please note that software in universe WILL NOT receive any +## review or updates from the Ubuntu security team. +deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy universe +# deb-src http://archive.ubuntu.com/ubuntu/ jammy universe +deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates universe +# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates universe + +## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu +## team, and may not be under a free licence. Please satisfy yourself as to +## your rights to use the software. Also, please note that software in +## multiverse WILL NOT receive any review or updates from the Ubuntu +## security team. +deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy multiverse +# deb-src http://archive.ubuntu.com/ubuntu/ jammy multiverse +deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates multiverse + +## N.B. software from this repository may not have been tested as +## extensively as that contained in the main release, although it includes +## newer versions of some applications which may provide useful features. +## Also, please note that software in backports WILL NOT receive any review +## or updates from the Ubuntu security team. +deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse +# deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse + +deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security main restricted +# deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted +deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security universe +# deb-src http://security.ubuntu.com/ubuntu/ jammy-security universe +deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security multiverse +# deb-src http://security.ubuntu.com/ubuntu/ jammy-security multiverse + +deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted +deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted +deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy universe +deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates universe +deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy multiverse +deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates multiverse +deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse +deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted +deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security universe +deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security multiverse diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 411845d..77e95f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,40 +6,38 @@ on: jobs: build: permissions: write-all - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v3 - - uses: pguyot/arm-runner-action@v2.5.2 - with: - base_image: https://dietpi.com/downloads/images/DietPi_RPi-ARMv8-Bullseye.img.xz - cpu: cortex-a53 - bind_mount_repository: true - image_additional_mb: 4096 - optimize_image: false - commands: | - # Rust complains (rightly) that $HOME doesn't match eid home - export HOME=/root - # Workaround to CI worker being stuck on Updating crates.io index - export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse - # Install setup prerequisites - apt-get update -y --allow-releaseinfo-change - apt-get upgrade -y - apt-get autoremove -y - apt-get install curl - curl https://sh.rustup.rs -sSf | sh -s -- -y - . "$HOME/.cargo/env" - curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - # Install build tools and tauri-cli requirements - apt-get install -y libwebkit2gtk-4.0-dev build-essential wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev - # Install wasm32 target and tauri-cli - rustup target add wasm32-unknown-unknown - cargo install tauri-cli trunk - # Build the application - cargo tauri build --config '{"package": {"version": "${{ github.event.release.tag_name }}"}}' + - name: Install rust dependencies + run: | + apt update && sudo apt install libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev -y + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + . "$HOME/.cargo/env" + rustup target add wasm32-unknown-unknown + rustup target add aarch64-unknown-linux-gnu + cargo install tauri-cli trunk + + - name: Install cross-compilers + run: | + apt update && apt install gcc-aarch64-linux-gnu -y + sudo dpkg --add-architecture arm64 + mv .github/sources.list /etc/apt/sources.list + apt update && apt upgrade -y + + - name: Install arm dependencies + run: | + sudo apt install libwebkit2gtk-4.0-dev:arm64 -y + sudo apt install libssl-dev:arm64 -y + + - name: Build application + run: | + export PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu/ + cargo tauri build --config '{"package": {"version": "${{ github.event.release.tag_name }}"}}' --target aarch64-unknown-linux-gnu - name: Upload Release Asset env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: - gh release upload ${{ github.event.release.tag_name }} ${{ github.workspace }}/target/release/bundle/deb/home-display*.deb \ No newline at end of file + gh release upload ${{ github.event.release.tag_name }} ${{ github.workspace }}/target/release/bundle/deb/home-display*.deb