@@ -13,104 +13,113 @@ jobs:
1313 steps :
1414 - uses : actions/checkout@v3
1515
16- - name : Install libraries
16+ - name : Generate Tag
1717 run : |
18- sudo apt update
19- sudo apt install clang-format
20- sudo apt install libgles2-mesa-dev libegl1-mesa-dev libxkbcommon-dev libwayland-dev libdrm-dev libgbm-dev libinput-dev libudev-dev libsystemd-dev wayland-protocols libx11-dev
21-
22- - name : Verify formatting
23- run : |
24- find src/flutter/shell/platform/linux_embedded/ -iname *.h -o -iname *.cc | xargs clang-format --dry-run --Werror
25- find src/client_wrapper -iname *.h -o -iname *.cc | xargs clang-format --dry-run --Werror
26-
27- - name : Create Build Environment
28- run : cmake -E make_directory ${{github.workspace}}/build
29-
30- - name : Install Flutter Engine library
31- # run: |
32- # echo `curl https://raw.githubusercontent.com/flutter/flutter/master/bin/internal/engine.version` > embedder.version
33- # export FLUTTER_ENGINE=`cat embedder.version`
34- # curl -O https://storage.googleapis.com/flutter_infra/flutter/${FLUTTER_ENGINE}/linux-x64/linux-x64-embedder
35- # ls
36- # unzip linux-x64-embedder
37- # mv libflutter_engine.so ${{github.workspace}}/build
38- run : |
39- curl -L https://github.com/sony/flutter-embedded-linux/releases/latest/download/elinux-x64-release.zip > elinux-x64-release.zip
40- unzip elinux-x64-release.zip
41- mv libflutter_engine.so ${{github.workspace}}/build
42-
43- - name : Configure CMake for wayland client
44- shell : bash
45- working-directory : ${{github.workspace}}/build
46- run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSER_PROJECT_PATH=examples/flutter-wayland-client ..
47-
48- - name : Build for wayland client
49- working-directory : ${{github.workspace}}/build
50- shell : bash
51- # Execute the build. You can specify a specific target with "--target <NAME>"
52- run : cmake --build . --config $BUILD_TYPE
53-
54- - name : Configure CMake for drm backend with GBM
55- shell : bash
56- working-directory : ${{github.workspace}}/build
57- run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSER_PROJECT_PATH=examples/flutter-drm-gbm-backend ..
58-
59- - name : Build for drm backend with GBM
60- working-directory : ${{github.workspace}}/build
61- shell : bash
62- run : cmake --build . --config $BUILD_TYPE
63-
64- - name : Configure CMake for drm backend with EGLStream
65- shell : bash
66- working-directory : ${{github.workspace}}/build
67- run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSER_PROJECT_PATH=examples/flutter-drm-eglstream-backend ..
68-
69- - name : Build for drm backend with EGLStream
70- working-directory : ${{github.workspace}}/build
71- shell : bash
72- run : cmake --build . --config $BUILD_TYPE
73-
74- - name : Configure CMake for x11 backend
75- shell : bash
76- working-directory : ${{github.workspace}}/build
77- run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSER_PROJECT_PATH=examples/flutter-x11-client ..
78-
79- - name : Build for x11 backend
80- working-directory : ${{github.workspace}}/build
81- shell : bash
82- run : cmake --build . --config $BUILD_TYPE
83-
84- - name : Configure CMake to build libflutter_elinux.so
85- shell : bash
86- working-directory : ${{github.workspace}}/build
87- run : cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_ELINUX_SO=ON -DBACKEND_TYPE=WAYLAND ..
88-
89- - name : Build libflutter_elinux.so
90- working-directory : ${{github.workspace}}/build
91- shell : bash
92- run : cmake --build . --config $BUILD_TYPE
93- - name : Create ZIP
94- run : |
95- cd ${{github.workspace}}/build
96- zip -r ../release.zip ./*
97- - name : Create Git Tag
98- run : |
99- TAG="release-$(date +'%Y.%m.%d').$(git rev-parse --short HEAD)"
100- git tag $TAG
101- git push origin $TAG
102- echo "tag=$TAG" >> $GITHUB_OUTPUT
103- env :
104- GITHUB_TOKEN : ${{ secrets.ACCESS_TOKEN }}
105- - name : Debug Tag
18+ TAG="release-$(date +'%Y.%m.%d')"
19+ echo "TAG=$TAG" >> $GITHUB_ENV # 设置为全局环境变量
20+
21+ - name : Print Tag
10622 run : |
107- echo "Tag will be: ${{ steps.tag.outputs.tag }}"
23+ echo "Tag is: $TAG" # 直接引用环境变量
24+
25+ # - name: Install libraries
26+ # run: |
27+ # sudo apt update
28+ # sudo apt install clang-format
29+ # sudo apt install libgles2-mesa-dev libegl1-mesa-dev libxkbcommon-dev libwayland-dev libdrm-dev libgbm-dev libinput-dev libudev-dev libsystemd-dev wayland-protocols libx11-dev
30+
31+ # - name: Verify formatting
32+ # run: |
33+ # find src/flutter/shell/platform/linux_embedded/ -iname *.h -o -iname *.cc | xargs clang-format --dry-run --Werror
34+ # find src/client_wrapper -iname *.h -o -iname *.cc | xargs clang-format --dry-run --Werror
35+
36+ # - name: Create Build Environment
37+ # run: cmake -E make_directory ${{github.workspace}}/build
38+
39+ # - name: Install Flutter Engine library
40+ # #run: |
41+ # # echo `curl https://raw.githubusercontent.com/flutter/flutter/master/bin/internal/engine.version` > embedder.version
42+ # # export FLUTTER_ENGINE=`cat embedder.version`
43+ # # curl -O https://storage.googleapis.com/flutter_infra/flutter/${FLUTTER_ENGINE}/linux-x64/linux-x64-embedder
44+ # # ls
45+ # # unzip linux-x64-embedder
46+ # # mv libflutter_engine.so ${{github.workspace}}/build
47+ # run: |
48+ # curl -L https://github.com/sony/flutter-embedded-linux/releases/latest/download/elinux-x64-release.zip > elinux-x64-release.zip
49+ # unzip elinux-x64-release.zip
50+ # mv libflutter_engine.so ${{github.workspace}}/build
51+
52+ # - name: Configure CMake for wayland client
53+ # shell: bash
54+ # working-directory: ${{github.workspace}}/build
55+ # run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSER_PROJECT_PATH=examples/flutter-wayland-client ..
56+
57+ # - name: Build for wayland client
58+ # working-directory: ${{github.workspace}}/build
59+ # shell: bash
60+ # # Execute the build. You can specify a specific target with "--target <NAME>"
61+ # run: cmake --build . --config $BUILD_TYPE
62+
63+ # - name: Configure CMake for drm backend with GBM
64+ # shell: bash
65+ # working-directory: ${{github.workspace}}/build
66+ # run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSER_PROJECT_PATH=examples/flutter-drm-gbm-backend ..
67+
68+ # - name: Build for drm backend with GBM
69+ # working-directory: ${{github.workspace}}/build
70+ # shell: bash
71+ # run: cmake --build . --config $BUILD_TYPE
72+
73+ # - name: Configure CMake for drm backend with EGLStream
74+ # shell: bash
75+ # working-directory: ${{github.workspace}}/build
76+ # run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSER_PROJECT_PATH=examples/flutter-drm-eglstream-backend ..
77+
78+ # - name: Build for drm backend with EGLStream
79+ # working-directory: ${{github.workspace}}/build
80+ # shell: bash
81+ # run: cmake --build . --config $BUILD_TYPE
82+
83+ # - name: Configure CMake for x11 backend
84+ # shell: bash
85+ # working-directory: ${{github.workspace}}/build
86+ # run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSER_PROJECT_PATH=examples/flutter-x11-client ..
87+
88+ # - name: Build for x11 backend
89+ # working-directory: ${{github.workspace}}/build
90+ # shell: bash
91+ # run: cmake --build . --config $BUILD_TYPE
92+
93+ # - name: Configure CMake to build libflutter_elinux.so
94+ # shell: bash
95+ # working-directory: ${{github.workspace}}/build
96+ # run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_ELINUX_SO=ON -DBACKEND_TYPE=WAYLAND ..
97+
98+ # - name: Build libflutter_elinux.so
99+ # working-directory: ${{github.workspace}}/build
100+ # shell: bash
101+ # run: cmake --build . --config $BUILD_TYPE
102+ # - name: Create ZIP
103+ # run: |
104+ # cd ${{github.workspace}}/build
105+ # zip -r ../release.zip ./*
106+ # - name: Create Git Tag
107+ # run: |
108+ # TAG="release-$(date +'%Y.%m.%d').$(git rev-parse --short HEAD)"
109+ # git tag $TAG
110+ # git push origin $TAG
111+ # echo "tag=$TAG" >> $GITHUB_OUTPUT
112+ # env:
113+ # GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
114+ # - name: Debug Tag
115+ # run: |
116+ # echo "Tag will be: ${{ steps.tag.outputs.tag }}"
108117
109- - name : Upload Release Asset
110- uses : softprops/action-gh-release@v1
111- # if: startsWith(github.ref, 'refs/tags/')
112- with :
113- files : release.zip
114- tag_name : ${{ steps.tag.outputs.tag }}
115- env :
116- GITHUB_TOKEN : ${{ secrets.ACCESS_TOKEN }}
118+ # - name: Upload Release Asset
119+ # uses: softprops/action-gh-release@v1
120+ # #if: startsWith(github.ref, 'refs/tags/')
121+ # with:
122+ # files: release.zip
123+ # tag_name: ${{ steps.tag.outputs.tag }}
124+ # env:
125+ # GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
0 commit comments