Skip to content

Commit 2bd6d31

Browse files
committed
fix: stuf
Signed-off-by: Awar Abdulkarim <48431495+NotAwar@users.noreply.github.com>
1 parent bb69ced commit 2bd6d31

File tree

11 files changed

+78
-31
lines changed

11 files changed

+78
-31
lines changed

.github/actions/submit_sdk/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ runs:
2626
- name: Check inputs
2727
shell: bash
2828
run: |
29+
sudo -i
2930
if [ -z "${{ inputs.catalog-url }}" ] ; then
3031
echo "Invalid catalog-url: ${{ inputs.catalog-url }}"
3132
exit 1
@@ -49,6 +50,7 @@ runs:
4950
- name: Submit SDK
5051
shell: bash
5152
run: |
53+
sudo -i
5254
curl -sX 'GET' \
5355
'${{ inputs.catalog-url }}/api/v0/0/sdk?length=500' \
5456
-H 'Accept: application/json' > sdk_versions.json

.github/workflows/build.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@ permissions: write-all
1717
jobs:
1818
main:
1919
runs-on: ubuntu-latest
20-
container:
21-
options: --user root
2220
strategy:
2321
fail-fast: false
2422
matrix:
2523
target: [f7, f18]
2624
steps:
2725
- name: 'Wipe workspace'
28-
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
26+
run: sudo find ./ -mount -maxdepth 1 -exec rm -rf {} \;
2927

3028
- name: 'Checkout code'
3129
uses: actions/checkout@v4
@@ -36,6 +34,8 @@ jobs:
3634
- name: 'Get commit details'
3735
id: names
3836
run: |
37+
set -e
38+
sudo -i
3939
BUILD_TYPE='DEBUG=1 COMPACT=0'
4040
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
4141
TYPE="pull"
@@ -54,6 +54,7 @@ jobs:
5454
- name: 'Check API versions for consistency between targets'
5555
run: |
5656
set -e
57+
sudo -i
5758
N_API_HEADER_SIGNATURES=`ls -1 targets/f*/api_symbols.csv | xargs -I {} sh -c "head -n2 {} | md5sum" | sort -u | wc -l`
5859
if [ $N_API_HEADER_SIGNATURES != 1 ] ; then
5960
echo API versions aren\'t matching for available targets. Please update!
@@ -65,16 +66,21 @@ jobs:
6566
- name: 'Build the firmware and apps'
6667
id: build-fw
6768
run: |
69+
set -e
70+
sudo -i
6871
./fbt TARGET_HW=$TARGET_HW $FBT_BUILD_TYPE copro_dist updater_package fap_dist
6972
echo "firmware_api=$(./fbt TARGET_HW=$TARGET_HW get_apiversion)" >> $GITHUB_OUTPUT
7073
7174
- name: 'Check for uncommitted changes'
7275
run: |
76+
set -e
77+
sudo -i
7378
git diff --exit-code
7479
7580
- name: 'Copy build output'
7681
run: |
7782
set -e
83+
sudo -i
7884
rm -rf artifacts map_analyser_files || true
7985
mkdir artifacts map_analyser_files
8086
cp dist/${TARGET}-*/* artifacts/ || true
@@ -88,12 +94,16 @@ jobs:
8894
- name: 'Copy universal artifacts'
8995
if: ${{ !github.event.pull_request.head.repo.fork && matrix.target == env.DEFAULT_TARGET }}
9096
run: |
97+
set -e
98+
sudo -i
9199
tar czpf "artifacts/flipper-z-any-scripts-${SUFFIX}.tgz" scripts
92100
cp build/core2_firmware.tgz "artifacts/flipper-z-any-core2_firmware-${SUFFIX}.tgz"
93101
94102
- name: 'Upload artifacts to update server'
95103
if: ${{ !github.event.pull_request.head.repo.fork }}
96104
run: |
105+
set -e
106+
sudo -i
97107
FILES=$(for ARTIFACT in $(find artifacts -maxdepth 1 -not -type d); do echo "-F files=@${ARTIFACT}"; done)
98108
curl --fail -L -H "Token: ${{ secrets.INDEXER_TOKEN }}" \
99109
-F "branch=${BRANCH_NAME}" \
@@ -104,6 +114,8 @@ jobs:
104114
- name: 'Copy & analyse map analyser files'
105115
if: ${{ !github.event.pull_request.head.repo.fork && matrix.target == env.DEFAULT_TARGET }}
106116
run: |
117+
set -e
118+
sudo -i
107119
cp build/${DEFAULT_TARGET}-firmware-*/firmware.elf.map map_analyser_files/firmware.elf.map
108120
cp build/${DEFAULT_TARGET}-firmware-*/firmware.elf map_analyser_files/firmware.elf
109121
source scripts/toolchain/fbtenv.sh

.github/workflows/build_compact.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131

3232
- name: 'Get commit details'
3333
run: |
34+
sudo -i
3435
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
3536
TYPE="pull"
3637
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
@@ -44,6 +45,7 @@ jobs:
4445
id: build-fw
4546
run: |
4647
set -e
48+
sudo -i
4749
TARGET="$(echo '${{ matrix.target }}' | sed 's/f//')"; \
4850
./fbt TARGET_HW=$TARGET DEBUG=0 COMPACT=1 fap_dist updater_package
4951
echo "sdk-file=$(ls dist/${{ matrix.target }}-*/flipper-z-${{ matrix.target }}-sdk-*.zip)" >> $GITHUB_OUTPUT
@@ -58,13 +60,17 @@ jobs:
5860

5961
- name: Build test app with SDK
6062
run: |
63+
set -e
64+
sudo -i
6165
mkdir testapp
6266
cd testapp
6367
ufbt create APPID=testapp
6468
ufbt
6569
6670
- name: Build example & external apps with uFBT
6771
run: |
72+
set -e
73+
sudo -i
6874
for appdir in 'applications/examples'; do
6975
for app in $(find "$appdir" -maxdepth 1 -mindepth 1 -type d); do
7076
pushd $app
@@ -86,7 +92,5 @@ jobs:
8692
# needs: [compact]
8793
# if: always() && !contains(needs.*.result, 'failure')
8894
# runs-on: ubuntu-latest
89-
# container:
90-
# options: --user root
9195
# steps:
9296
# - run: echo "All good ✨" ;

.github/workflows/docs.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ jobs:
1515
check-secret:
1616
if: ${{ github.event.pull_request.head.repo.fork == false }}
1717
runs-on: ubuntu-latest
18-
container:
19-
options: --user root
2018
outputs:
2119
s3-valid-config: ${{ steps.check.outputs.s3-valid-config }}
2220

2321
steps:
2422
- name: 'Check if S3 key exists'
2523
id: check
2624
run: |
25+
set -e
26+
sudo -i
2727
if [[ -z "${{ secrets.FW_DOCS_AWS_ACCESS_KEY }}" || -z "${{ secrets.FW_DOCS_AWS_SECRET_KEY }}" || -z "${{ secrets.FW_DOCS_AWS_BUCKET }}" ]]; then
2828
echo "s3-valid-config=false" >> $GITHUB_OUTPUT;
2929
else
@@ -33,12 +33,10 @@ jobs:
3333
doxygen:
3434
if: ${{ github.event.pull_request.head.repo.fork == false }}
3535
runs-on: ubuntu-latest
36-
container:
37-
options: --user root
3836
needs: check-secret
3937
steps:
4038
- name: 'Wipe workspace'
41-
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
39+
run: sudo find ./ -mount -maxdepth 1 -exec rm -rf {} \;
4240

4341
- name: 'Checkout code'
4442
uses: actions/checkout@v4
@@ -50,6 +48,8 @@ jobs:
5048
- name: 'Get commit details'
5149
id: names
5250
run: |
51+
set -e
52+
sudo -i
5353
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
5454
TYPE="pull"
5555
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
@@ -65,7 +65,7 @@ jobs:
6565
version: "1.12.0"
6666

6767
- name: 'Generate documentation'
68-
run: ./fbt doxygen
68+
run: sudo ./fbt doxygen
6969

7070
- name: 'Upload documentation'
7171
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/dev' && needs.check-secret.outputs.s3-valid-config == 'true' }}

.github/workflows/lint_and_submodule_check.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ permissions: write-all
1111
jobs:
1212
lint_sources_check_submodules:
1313
runs-on: ubuntu-latest
14-
container:
15-
options: --user root
1614
steps:
1715
- name: 'Wipe workspace'
18-
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
16+
run: sudo find ./ -mount -maxdepth 1 -exec rm -rf {} \;
1917

2018
- name: 'Checkout code'
2119
uses: actions/checkout@v4
@@ -25,6 +23,8 @@ jobs:
2523

2624
- name: 'Check protobuf branch'
2725
run: |
26+
set -e
27+
sudo -i
2828
git submodule update --init;
2929
SUB_PATH="assets/protobuf";
3030
SUB_BRANCH="dev";
@@ -48,6 +48,8 @@ jobs:
4848
id: check_todos
4949
working-directory: ./
5050
run: |
51+
set -e
52+
sudo -i
5153
# Use our new TODO tracker script
5254
python scripts/tools/todo_tracker.py --root . --output pr_todo_report --format json
5355
@@ -67,7 +69,8 @@ jobs:
6769
id: syntax_check_py
6870
if: always()
6971
run: |
70-
set +e;
72+
set -e
73+
sudo -i
7174
./fbt -s lint_py 2>&1 | tee lint-py.log;
7275
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
7376
# Save multiline output
@@ -84,7 +87,8 @@ jobs:
8487
id: syntax_check_cpp
8588
if: always()
8689
run: |
87-
set +e;
90+
set -e
91+
sudo -i
8892
./fbt -s lint 2>&1 | tee lint-cpp.log;
8993
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
9094
# Save multiline output
@@ -100,7 +104,8 @@ jobs:
100104
- name: 'Check image assets'
101105
if: always()
102106
run: |
103-
set +e;
107+
set -e
108+
sudo -i
104109
./fbt -s lint_img 2>&1 | tee lint-assets.log;
105110
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
106111
# Save multiline output
@@ -116,6 +121,8 @@ jobs:
116121
- name: Report code formatting errors
117122
if: ( steps.syntax_check_py.outputs.errors || steps.syntax_check_cpp.outputs.errors ) && github.event.pull_request
118123
run: |
124+
set -e
125+
sudo -i
119126
echo "Code formatting errors found";
120127
echo "Please run './fbt format' or './fbt format_py' to fix them";
121128
exit 1;

.github/workflows/merge_report.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ permissions: write-all
1212
jobs:
1313
merge_report:
1414
runs-on: ubuntu-latest
15-
container:
16-
options: --user root
1715
steps:
1816
- name: 'Wipe workspace'
19-
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
17+
run: sudo find ./ -mount -maxdepth 1 -exec rm -rf {} \;
2018

2119
- name: 'Checkout code'
2220
uses: actions/checkout@v4
@@ -26,6 +24,8 @@ jobs:
2624

2725
- name: 'Get commit details'
2826
run: |
27+
set -e
28+
sudo -i
2929
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
3030
TYPE="pull"
3131
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
@@ -37,6 +37,8 @@ jobs:
3737
3838
- name: 'Check ticket and report'
3939
run: |
40+
set -e
41+
sudo -i
4042
source scripts/toolchain/fbtenv.sh
4143
python3 -m pip install slack_sdk
4244
python3 scripts/merge_report_qa.py \

.github/workflows/pvs_studio.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ jobs:
1717
analyse_c_cpp:
1818
if: ${{ !github.event.pull_request.head.repo.fork }}
1919
runs-on: ubuntu-latest
20-
container:
21-
options: --user root
2220
steps:
2321
- name: 'Wipe workspace'
24-
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
22+
run: sudo find ./ -mount -maxdepth 1 -exec rm -rf {} \;
2523

2624
- name: 'Checkout code'
2725
uses: actions/checkout@v4
@@ -32,6 +30,8 @@ jobs:
3230
- name: 'Get commit details'
3331
id: names
3432
run: |
33+
set -e
34+
sudo -i
3535
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
3636
TYPE="pull"
3737
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
@@ -43,11 +43,15 @@ jobs:
4343
4444
- name: 'Supply PVS credentials'
4545
run: |
46+
set -e
47+
sudo -i
4648
pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }}
4749
4850
- name: 'Convert PVS-Studio output to html and detect warnings'
4951
id: pvs-warn
5052
run: |
53+
set -e
54+
sudo -i
5155
WARNINGS=0
5256
./fbt COMPACT=1 PVSNOBROWSER=1 firmware_pvs || WARNINGS=1
5357
echo "warnings=${WARNINGS}" >> $GITHUB_OUTPUT
@@ -89,6 +93,10 @@ jobs:
8993
- name: 'Raise exception'
9094
if: ${{ steps.pvs-warn.outputs.warnings != 0 }}
9195
run: |
96+
97+
set -e
98+
sudo -i
99+
92100
echo "Please fix all PVS warnings before merge"
93101
echo "Report: ${{ steps.pvs-warn.outputs.report-url }}"
94102
echo "[PVS report](${{ steps.pvs-warn.outputs.report-url }})" >> $GITHUB_STEP_SUMMARY

.github/workflows/reindex.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,23 @@ jobs:
99
reindex:
1010
name: 'Post-release hooks'
1111
runs-on: ubuntu-latest
12-
container:
13-
options: --user root
1412
steps:
1513
- name: 'Checkout code'
1614
uses: actions/checkout@v4
1715

1816
- name: 'Trigger reindex'
1917
run: |
18+
19+
set -e
20+
sudo -i
2021
curl --fail -L -H "Token: ${{ secrets.INDEXER_TOKEN }}" \
2122
"${{ secrets.INDEXER_URL }}"/firmware/reindex;
2223
2324
- name: 'Send release notification'
2425
if: ${{ github.event.action == 'released' }}
2526
run: |
27+
set -e
28+
sudo -i
2629
echo '${{ secrets.FIREBASE_TOKEN }}' > firebase-token.json;
2730
python3 -m pip install firebase-admin==6.4.0;
2831
python3 scripts/send_firebase_notification.py \
@@ -32,4 +35,6 @@ jobs:
3235
- name: 'Remove firebase token'
3336
if: always()
3437
run: |
38+
set -e
39+
sudo -i
3540
rm -rf firebase-token.json;

0 commit comments

Comments
 (0)