File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 11name : " Build Anchor"
22description : " Build Anchor"
33inputs :
4- testing :
5- description : " Whether to run tests"
6- required : false
7- default : " true"
84 program :
95 description : " Program to build"
106 required : true
7+ features :
8+ description : " Features that will be passed into the build"
9+ required : false
1110runs :
1211 using : " composite"
1312 steps :
1413 - name : Build Program
1514 shell : bash
1615 run : |
1716 echo "Building Anchor program: ${{ inputs.program }} to get IDL"
18- anchor build -p ${{ inputs.program }}
17+ FEATURES="${{ inputs.features }}"
18+ if [ ! -z "$FEATURES" ]; then
19+ FEATURES="--features $FEATURES"
20+ fi
21+
22+ anchor build -p ${{ inputs.program }} -- $FEATURES
1923 - name : Copy artifacts from container
2024 shell : bash
2125 run : |
Original file line number Diff line number Diff line change 44 program :
55 description : " Program to test"
66 required : true
7+ features :
8+ description : " Features that will be passed into the test"
9+ required : false
710
811runs :
912 using : " composite"
3740 RUST_BACKTRACE : 1
3841 run : |
3942 echo "Running tests for program: ${{ inputs.program }}"
40- anchor test
43+ FEATURES="${{ inputs.features }}"
44+ if [ ! -z "$FEATURES" ]; then
45+ FEATURES="--features $FEATURES"
46+ fi
47+
48+ anchor test -- $FEATURES
4149
4250 - name : Check Test Results
4351 if : ${{ failure() }}
You can’t perform that action at this time.
0 commit comments