-
Notifications
You must be signed in to change notification settings - Fork 29
53 lines (52 loc) · 2.29 KB
/
pull_request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Pull Request
permissions: read-all
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
jobs:
CodeCheck:
runs-on: ubuntu-latest
steps:
- name: Setup Environment
run: |
sudo apt install -y python3 python3-pip python3-git python3-ply git shellcheck perl codespell
sudo mkdir -p /usr/share/codespell
sudo wget https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt -O /usr/share/codespell/dictionary.txt
sudo wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt -O /usr/bin/spelling.txt
sudo wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/const_structs.checkpatch -O /usr/bin/const_structs.checkpatch
sudo wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl -O /bin/checkpatch.pl
sudo chmod +x /bin/checkpatch.pl
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check Code
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
./.github/scripts/pr_check "origin/${{ github.base_ref }}" "${{ github.sha }}"
BuildCheck:
runs-on: ubuntu-latest
steps:
- name: Setup Environment
run: |
sudo apt remove docker docker-engine docker.io containerd runc -y
sudo apt install ca-certificates curl gnupg lsb-release -y
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build Docker Image
run: sudo docker build -f BM/Dockerfile.build -t builder BM
- name: Build Project
run: sudo ./.github/scripts/build_check