-
Notifications
You must be signed in to change notification settings - Fork 91
93 lines (91 loc) · 2.8 KB
/
check.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Check
on:
push:
branches:
- master
pull_request:
repository_dispatch:
types: [run_build]
jobs:
check-headers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake cmake-data git doxygen python3 curl rsync
- name: Check
run: |
set -e
export TRAVIS_BUILD_DIR=$PWD
cd $TRAVIS_BUILD_DIR
bash $TRAVIS_BUILD_DIR/.travis.d/download_sdk.sh
export VITASDK=$PWD/vitasdk
export PATH=$VITASDK/bin:$PATH
export INCLUDE_DIR=$TRAVIS_BUILD_DIR/include
ls ./db | xargs -I__name__ vita-nid-check -dbdirver=./db/__name__ -dbg=trace
# Make sure headers are valid
# bash $TRAVIS_BUILD_DIR/.travis.d/download_external_libs.sh
cd $VITASDK/arm-vita-eabi/include
rm -rf psp2 psp2common psp2kern vitasdk vitasdk.h vitasdkkern.h
cd $TRAVIS_BUILD_DIR
find $INCLUDE_DIR -type f -name "*.h" | xargs -I FN -n 1 -P 4 arm-vita-eabi-gcc -I$INCLUDE_DIR -fsyntax-only -c FN -o /dev/null
find $INCLUDE_DIR -type f -name "*.h" | xargs -I FN -n 1 -P 4 arm-vita-eabi-g++ -I$INCLUDE_DIR -fsyntax-only -c FN -o /dev/null
cd $VITASDK/arm-vita-eabi/lib
rm -rf *_stub.a
cd $TRAVIS_BUILD_DIR
cp -r include/* $VITASDK/arm-vita-eabi/include
# header define check
BYPASS_VITA_LIBS_GEN=1 USE_LINT=1 python3 build.py output
vdpm SDL2
vdpm curl
vdpm openssl
vdpm soloud
vdpm zlib
vdpm taihen
- name: DB Stub test
run: |
export VITASDK=$PWD/vitasdk
export PATH=$VITASDK/bin:$PATH
vita-libs-gen-2 -yml=./db -output=./stubs
cd ./stubs
make -j$(nproc) install
cd ..
rm stubs/makefile
tar "cfvj" "vitasdk-db-stubs.tar.bz2" "stubs"
- name: Header sanitize checks
run: |
export VITASDK=$PWD/vitasdk
export PATH=$VITASDK/bin:$PATH
cd check_size
python3 ./includes_all.py ../include
mkdir build
cd build
cmake ..
make -j$(nproc)
- name: NID compat checks
run: |
export VITASDK=$PWD/vitasdk
export PATH=$VITASDK/bin:$PATH
cd check_nid_compat
mkdir build
cd build
cmake ..
make -j$(nproc)
- name: Sample build test
run: |
export VITASDK=$PWD/vitasdk
export PATH=$VITASDK/bin:$PATH
git clone https://github.com/vitasdk/samples
cd samples
mkdir build
cd build
cmake ..
make -j$(nproc)
- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: vitasdk-db-stubs
path: vitasdk-db-stubs.tar.bz2