From 1da53bd2c84592ac7254be7d78816ea8f2a99594 Mon Sep 17 00:00:00 2001 From: HalfSweet Date: Thu, 18 Jan 2024 10:43:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8D=A2=E6=88=90=E6=9C=AC=E6=9C=BA?= =?UTF-8?q?=E7=9A=84=E4=BA=A4=E5=8F=89=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 64 +++++++++++++++++++---------------- .ubuntu-22.04.source | 52 ++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 30 deletions(-) create mode 100644 .ubuntu-22.04.source diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26b88f7..32bcf90 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,35 +112,39 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: pguyot/arm-runner-action@v2 + - name: Rust setup + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target.name }} + + - uses: pnpm/action-setup@v2 with: - base_image: raspios_lite_arm64:latest - cpu: cortex-a53 - # bind_mount_repository: true - image_additional_mb: 10240 - 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 framework specific packages - apt-get install -y nodejs - npm install -g pnpm - # 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 - # cargo install tauri-cli - # Install frontend dependencies - export GITHUB_EVENT_PATH="" - pnpm install - # Build the application - pnpm tauri build + version: latest + - name: Sync node version and setup cache + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'pnpm' # Set this to npm, yarn or pnpm. + - run: pnpm install + + - name: Set up Rust + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target.name }} + + - run: | + sudo apt-get update + sudo apt-get install gcc-aarch64-linux-gnu -y + sudo dpkg --add-architecture arm64 + sudo rm -rf /etc/apt/sources.list + sudo cp ./.ubuntu-22.04.source /etc/apt/sources.list + sudo apt-get update && sudo apt-get upgrade -y + sudo apt-get install -y libudev-dev libusb-1.0-0-dev libssl-dev pkg-config + sudo apt install libhidapi-dev -y + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev + sudo apt-get install -y libudev-dev:arm64 libusb-1.0-0-dev:arm64 libssl-dev:arm64 + sudo apt-get install -y libgtk-3-dev:arm64 libwebkit2gtk-4.0-dev:arm64 libayatana-appindicator3-dev:arm64 librsvg2-dev:arm64 + export PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu/ + pnpm install + pnpm tauri build --target aarch64-unknown-linux-gnu \ No newline at end of file diff --git a/.ubuntu-22.04.source b/.ubuntu-22.04.source new file mode 100644 index 0000000..fa61528 --- /dev/null +++ b/.ubuntu-22.04.source @@ -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 \ No newline at end of file