ci: configure Gitea Actions for Docker-based runner
Some checks failed
CI / lint-and-build (push) Failing after 2s
Some checks failed
CI / lint-and-build (push) Failing after 2s
Use explicit ubuntu:22.04 container instead of marketplace actions that may not work on self-hosted Gitea runners. Install Node.js and Rust toolchain directly via curl/rustup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,37 +2,37 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, master]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main, master]
|
branches: [main]
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ gitea.workflow }}-${{ gitea.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-and-test:
|
lint-and-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ubuntu:22.04
|
||||||
|
env:
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Linux dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
apt-get update
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev
|
apt-get install -y \
|
||||||
|
build-essential curl wget pkg-config \
|
||||||
|
libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev \
|
||||||
|
libssl-dev git ca-certificates
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- name: Install Node.js 22
|
||||||
with:
|
run: |
|
||||||
components: clippy, rustfmt
|
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
||||||
|
apt-get install -y nodejs
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- name: Install Rust toolchain
|
||||||
with:
|
run: |
|
||||||
workspaces: src-tauri
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --component clippy,rustfmt
|
||||||
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
- name: Install frontend dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
@@ -41,51 +41,21 @@ jobs:
|
|||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
- name: Rust fmt check
|
- name: Rust fmt check
|
||||||
run: cd src-tauri && cargo fmt --check
|
run: |
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
|
cd src-tauri && cargo fmt --check
|
||||||
|
|
||||||
- name: Rust clippy
|
- name: Rust clippy
|
||||||
run: cd src-tauri && cargo clippy -- -D warnings
|
run: |
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
|
cd src-tauri && cargo clippy -- -D warnings
|
||||||
|
|
||||||
- name: Rust tests
|
- name: Rust tests
|
||||||
run: cd src-tauri && cargo test
|
|
||||||
|
|
||||||
- name: Frontend tests
|
|
||||||
run: npm test
|
|
||||||
|
|
||||||
build:
|
|
||||||
needs: lint-and-test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Linux dependencies
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
. "$HOME/.cargo/env"
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev
|
cd src-tauri && cargo test
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
workspaces: src-tauri
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Build Tauri app
|
- name: Build Tauri app
|
||||||
run: npm run tauri build
|
run: |
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
- name: Upload artifacts
|
npm run tauri build
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: tusk-linux-x64
|
|
||||||
path: |
|
|
||||||
src-tauri/target/release/bundle/deb/*.deb
|
|
||||||
src-tauri/target/release/bundle/rpm/*.rpm
|
|
||||||
src-tauri/target/release/bundle/appimage/*.AppImage
|
|
||||||
if-no-files-found: ignore
|
|
||||||
|
|||||||
@@ -8,30 +8,38 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ubuntu:22.04
|
||||||
|
env:
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Linux dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
apt-get update
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev
|
apt-get install -y \
|
||||||
|
build-essential curl wget pkg-config jq file \
|
||||||
|
libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev \
|
||||||
|
libssl-dev git ca-certificates
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- name: Install Node.js 22
|
||||||
|
run: |
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
||||||
|
apt-get install -y nodejs
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- name: Install Rust toolchain
|
||||||
with:
|
run: |
|
||||||
workspaces: src-tauri
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||||
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
- name: Install frontend dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Build Tauri app
|
- name: Build Tauri app
|
||||||
run: npm run tauri build
|
run: |
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
|
npm run tauri build
|
||||||
|
|
||||||
- name: Create release and upload assets
|
- name: Create release and upload assets
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user