add gitea actions
This commit is contained in:
102
.gitea/workflows/build.yml
Normal file
102
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
name: Build on Multiple Distributions
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-on-arch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: archlinux:latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Install basic dependencies
|
||||||
|
run: |
|
||||||
|
pacman -Syu --noconfirm
|
||||||
|
pacman -S --noconfirm git nodejs npm
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
run: |
|
||||||
|
git clone https://gitea.akshun-lab.cc/aggarwalakshun/rust-setup.git .
|
||||||
|
git checkout $GITEA_SHA
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pacman -S --noconfirm rustup
|
||||||
|
rustup default stable
|
||||||
|
|
||||||
|
- name: Build with cargo
|
||||||
|
run: |
|
||||||
|
cargo build --release
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: arch-setup
|
||||||
|
path: target/release/setup
|
||||||
|
|
||||||
|
build-on-debian:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: debian:stable
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Install basic dependencies
|
||||||
|
run: |
|
||||||
|
apt update && apt upgrade -y
|
||||||
|
apt install -y git nodejs npm
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
run: |
|
||||||
|
git clone https://gitea.akshun-lab.cc/aggarwalakshun/rust-setup.git .
|
||||||
|
git checkout $GITEA_SHA
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
apt install -y cargo
|
||||||
|
|
||||||
|
- name: Build with cargo
|
||||||
|
run: |
|
||||||
|
cargo build --release
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: debian-setup
|
||||||
|
path: target/release/setup
|
||||||
|
|
||||||
|
build-on-fedora:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: fedora:latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Install basic dependencies
|
||||||
|
run: |
|
||||||
|
dnf up -y
|
||||||
|
dnf install -y git nodejs npm
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
run: |
|
||||||
|
git clone https://gitea.akshun-lab.cc/aggarwalakshun/rust-setup.git .
|
||||||
|
git checkout $GITEA_SHA
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
dnf install -y cargo
|
||||||
|
|
||||||
|
- name: Build with cargo
|
||||||
|
run: |
|
||||||
|
cargo build --release
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: fedora-setup
|
||||||
|
path: target/release/setup
|
||||||
|
|
||||||
Reference in New Issue
Block a user