Skip to content

Commit 7bec3bb

Browse files
authored
Update code format and autotest
Co-authored-by: kevingpqi <[email protected]>
1 parent 3c0b443 commit 7bec3bb

22 files changed

+37
-49
lines changed

Diff for: .github/workflows/autotest.yml

+14-9
Original file line numberDiff line numberDiff line change
@@ -69,31 +69,36 @@ jobs:
6969
run: |
7070
echo "file not exist"
7171
git clone -b main https://github.com/Tencent/libpag.git
72+
- if: github.event_name == 'push'
73+
name: Swith branch (push)
74+
run: |
75+
cd libpag
76+
git pull
7277
- if: github.event_name == 'pull_request'
73-
name: swith branch (pull_request)
78+
name: Swith branch (pull_request)
7479
run: |
7580
cd libpag
7681
git pull
7782
git checkout ${{ github.head_ref }}
78-
- if: github.event_name == 'push'
79-
name: swith branch (push)
80-
run: |
81-
cd libpag
82-
git pull
83+
8384
- name: brew link emscripten
84-
if: steps.cache-third_party.outputs.cache-hit == 'true'
85+
if: steps.cache-environment.outputs.cache-hit == 'true'
8586
run: |
8687
brew link emscripten
8788
8889
- name: Run autotest script
8990
run: |
90-
ls
9191
cd libpag
9292
chmod +x sync_deps.sh
9393
./sync_deps.sh
9494
chmod +x autotest.sh
9595
./autotest.sh
9696
shell: bash
97+
- name: codecov
98+
uses: codecov/[email protected]
99+
with:
100+
token: ${{ secrets.CODECOV_TOKEN }}
101+
file: libpag/result/coverage.xml
97102
- name: The job has failed
98103
if: ${{ failure() }}
99104
uses: actions/upload-artifact@v2
@@ -103,7 +108,7 @@ jobs:
103108
- uses: actions/upload-artifact@v2
104109
with:
105110
name: result
106-
path: result
111+
path: libpag/result
107112
- name: Compress libpag
108113
run: |
109114
cd libpag

Diff for: .github/workflows/code_format.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: code_format
22

33
on:
4+
push:
5+
branches: [ main ]
46
pull_request:
57
branches: [ main ]
68

@@ -18,7 +20,7 @@ jobs:
1820
- uses: actions/checkout@v2
1921
- name: Run codeformat script
2022
run: |
21-
npm install -g clang-format
23+
brew install clang-format
2224
chmod +x codeformat.sh
2325
./codeformat.sh
2426
shell: bash

Diff for: autotest.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function make_dir() {
44
rm -rf $1
55
mkdir -p $1
66
}
7-
echo "shell log - autotest start begin "
7+
echo "shell log - autotest start"
88
if [[ `uname` == 'Darwin' ]]; then
99
MAC_REQUIRED_TOOLS="gcovr"
1010
for TOOL in ${MAC_REQUIRED_TOOLS[@]}; do

Diff for: src/platform/cocoa/PAG.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818

1919
#import <Foundation/Foundation.h>
2020

21-
__attribute__((visibility("default")))
22-
@interface PAG : NSObject
21+
__attribute__((visibility("default"))) @interface PAG : NSObject
2322
/**
2423
* Get SDK version information.
2524
*/

Diff for: src/platform/cocoa/PAGComposition.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
#import <Foundation/Foundation.h>
2020
#import "PAGLayer.h"
2121

22-
__attribute__((visibility("default")))
23-
@interface PAGComposition : PAGLayer
22+
__attribute__((visibility("default"))) @interface PAGComposition : PAGLayer
2423

2524
/**
2625
* Make a empty PAGComposition with specified size.

Diff for: src/platform/cocoa/PAGFile.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
#import "PAGText.h"
2424
#import "PAGTimeStretchMode.h"
2525

26-
__attribute__((visibility("default")))
27-
@interface PAGFile : PAGComposition
26+
__attribute__((visibility("default"))) @interface PAGFile : PAGComposition
2827
/**
2928
* The maximum tag level current SDK supports.
3029
*/

Diff for: src/platform/cocoa/PAGFont.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818

1919
#import <Foundation/Foundation.h>
2020

21-
__attribute__((visibility("default")))
22-
@interface PAGFont : NSObject
21+
__attribute__((visibility("default"))) @interface PAGFont : NSObject
2322

2423
/**
2524
* A string with the name of the font family.

Diff for: src/platform/cocoa/PAGImage.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
#import <Foundation/Foundation.h>
2222
#import "PAGScaleMode.h"
2323

24-
__attribute__((visibility("default")))
25-
@interface PAGImage : NSObject
24+
__attribute__((visibility("default"))) @interface PAGImage : NSObject
2625
/**
2726
* Creates a PAGImage object from a CGImage object, return null if it's not valid CGImage object.
2827
*/

Diff for: src/platform/cocoa/PAGImageLayer.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
@class PAGImage;
2424
@class PAGVideoRange;
2525

26-
__attribute__((visibility("default")))
27-
@interface PAGImageLayer : PAGLayer
26+
__attribute__((visibility("default"))) @interface PAGImageLayer : PAGLayer
2827
/**
2928
* Make a PAGImageLayer with size and duration(in microseconds).
3029
*/

Diff for: src/platform/cocoa/PAGLayer.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ typedef NS_ENUM(NSInteger, PAGLayerType) {
3333
@class PAGComposition;
3434
@class PAGFile;
3535

36-
__attribute__((visibility("default")))
37-
@interface PAGLayer : NSObject
36+
__attribute__((visibility("default"))) @interface PAGLayer : NSObject
3837

3938
/**
4039
* Returns the type of layer.

Diff for: src/platform/cocoa/PAGMarker.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818

1919
#import <Foundation/Foundation.h>
2020

21-
__attribute__((visibility("default")))
22-
@interface PAGMarker : NSObject
21+
__attribute__((visibility("default"))) @interface PAGMarker : NSObject
2322

2423
@property(nonatomic) long long startTime;
2524
@property(nonatomic) long long duration;

Diff for: src/platform/cocoa/PAGPlayer.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
#import "PAGScaleMode.h"
2424
#import "PAGSurface.h"
2525

26-
__attribute__((visibility("default")))
27-
@interface PAGPlayer : NSObject
26+
__attribute__((visibility("default"))) @interface PAGPlayer : NSObject
2827
/**
2928
* Returns the current PAGComposition for PAGPlayer to render as content.
3029
*/

Diff for: src/platform/cocoa/PAGShapeLayer.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#import <Foundation/Foundation.h>
2020
#import "PAGLayer.h"
2121

22-
__attribute__((visibility("default")))
23-
@interface PAGShapeLayer : PAGLayer
22+
__attribute__((visibility("default"))) @interface PAGShapeLayer : PAGLayer
2423

2524
@end

Diff for: src/platform/cocoa/PAGSolidLayer.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
#import "CocoaUtils.h"
2121
#import "PAGLayer.h"
2222

23-
__attribute__((visibility("default")))
24-
@interface PAGSolidLayer : PAGLayer
23+
__attribute__((visibility("default"))) @interface PAGSolidLayer : PAGLayer
2524

2625
/**
2726
* Returns the layer's solid color.

Diff for: src/platform/cocoa/PAGText.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ enum {
3232
/**
3333
* The PAGText object stores a value for a TextLayer's Source Text property.
3434
*/
35-
__attribute__((visibility("default")))
36-
@interface PAGText : NSObject
35+
__attribute__((visibility("default"))) @interface PAGText : NSObject
3736

3837
/**
3938
* When true, the text layer shows a fill.

Diff for: src/platform/cocoa/PAGTextLayer.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222

2323
@class PAGFont;
2424

25-
__attribute__((visibility("default")))
26-
@interface PAGTextLayer : PAGLayer
25+
__attribute__((visibility("default"))) @interface PAGTextLayer : PAGLayer
2726

2827
/**
2928
* Returns the TextLayer’s fill color.

Diff for: src/platform/cocoa/PAGVideoDecoder.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818

1919
#import <Foundation/Foundation.h>
2020

21-
__attribute__((visibility("default")))
22-
@interface PAGVideoDecoder : NSObject
21+
__attribute__((visibility("default"))) @interface PAGVideoDecoder : NSObject
2322

2423
/**
2524
* Register a software decoder factory to implement the decoder fallback mechanism.

Diff for: src/platform/cocoa/PAGVideoRange.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
/**
2222
* Represents a time range from the content of PAGImageLayer.
2323
*/
24-
__attribute__((visibility("default")))
25-
@interface PAGVideoRange : NSObject
24+
__attribute__((visibility("default"))) @interface PAGVideoRange : NSObject
2625

2726
/**
2827
* The start time of the source video, in microseconds.

Diff for: src/platform/ios/PAGSurface.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
#import <QuartzCore/QuartzCore.h>
2323
#import "PAGImageLayer.h"
2424

25-
__attribute__((visibility("default")))
26-
@interface PAGSurface : NSObject
25+
__attribute__((visibility("default"))) @interface PAGSurface : NSObject
2726

2827
/**
2928
* Creates a new PAGSurface from specified CAEAGLLayer. The GPU context will be created internally

Diff for: src/platform/ios/PAGView.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@
6666

6767
@end
6868

69-
__attribute__((visibility("default")))
70-
@interface PAGView : UIView
69+
__attribute__((visibility("default"))) @interface PAGView : UIView
7170

7271
/**
7372
* Default is NO.

Diff for: src/platform/mac/PAGSurface.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
#import <QuartzCore/QuartzCore.h>
2424
#import "PAGImageLayer.h"
2525

26-
__attribute__((visibility("default")))
27-
@interface PAGSurface : NSObject
26+
__attribute__((visibility("default"))) @interface PAGSurface : NSObject
2827

2928
+ (PAGSurface*)FromView:(NSView*)view;
3029

Diff for: src/platform/mac/PAGView.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@
6666

6767
@end
6868

69-
__attribute__((visibility("default")))
70-
@interface PAGView : NSView
69+
__attribute__((visibility("default"))) @interface PAGView : NSView
7170

7271
/**
7372
* Adds a listener to the set of listeners that are sent events through the life of an animation,

0 commit comments

Comments
 (0)