Skip to content

feature: add windows cd#81

Merged
JackLau1222 merged 6 commits intomainfrom
win_cd
May 2, 2025
Merged

feature: add windows cd#81
JackLau1222 merged 6 commits intomainfrom
win_cd

Conversation

@JackLau1222
Copy link
Collaborator

No description provided.

@github-actions
Copy link

github-actions bot commented Mar 22, 2025

Workload Analysis:

Estimated workload for PR 81: 9.02
Estimated changedLine for PR 81: 312

SonarQube Analysis Result:

📈 Metrics:
🟢 new_maintainability_rating: A
🟢 new_reliability_rating: A
🟢 new_security_rating: A
🟢 new_security_review_rating: A

🐛 Issues
✅ 185 New issues
✅ 0 Accepted issues

📊 Measures

JackLau1222 and others added 5 commits May 2, 2025 16:32
specific src path in cmake

disable fftool transcoder
(AVRational){1, 60} is GCC/C99 “compound literal” syntax,  that’s not valid C++
modify build step name
Comment on lines +189 to +262

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 10 months ago

To fix the issue, we will add a permissions block at the workflow level to define the minimal permissions required for the jobs. Based on the actions used in the workflow:

  • contents: write is required for uploading release assets and interacting with repository contents.
  • packages: write is required for uploading artifacts.
  • actions: read is required for interacting with GitHub Actions metadata.

The permissions block will be added at the root level of the workflow to apply to all jobs. If any job requires additional permissions, they can be overridden at the job level.


Suggested changeset 1
.github/workflows/release.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -10,2 +10,7 @@
 
+permissions:
+  contents: write
+  packages: write
+  actions: read
+
 jobs:
EOF
@@ -10,2 +10,7 @@

permissions:
contents: write
packages: write
actions: read

jobs:
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +315 to +372
runs-on: windows-latest
concurrency:
group: "review-win-${{ github.event.pull_request.number }}"
cancel-in-progress: true

steps:
# Check out the repository code.
- name: Checkout repository
uses: actions/checkout@v2

# Set up the Qt environment.
- name: (2) Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.4.3
host: windows
target: desktop
arch: win64_msvc2019_64
dir: ${{ runner.temp }}
setup-python: false

# Download FFmpeg from the specified release URL.
- name: Download FFmpeg
shell: powershell
run: |
$ffmpegUrl = "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2024-03-31-17-28/ffmpeg-n4.4.4-94-g5d07afd482-win64-gpl-shared-4.4.zip"
$outputZip = "ffmpeg.zip"
Invoke-WebRequest -Uri $ffmpegUrl -OutFile $outputZip
Expand-Archive -Path $outputZip -DestinationPath ffmpeg
echo "FFMPEG_ROOT_PATH=$(pwd)/ffmpeg/ffmpeg-n4.4.4-94-g5d07afd482-win64-gpl-shared-4.4" >> $GITHUB_ENV

# Create a build directory, run qmake, and build the project.
- name: Build Qt project
run: |
(cd src &&
cmake -S . -B build "-DFFMPEG_ROOT_PATH=../ffmpeg/ffmpeg-n4.4.4-94-g5d07afd482-win64-gpl-shared-4.4" -DFFTOOL_TRANSCODER=OFF &&
cmake --build build --config Release --parallel)

- name : Deploy project
run: |
mkdir D:\deploy\OpenConverter
cd D:\deploy\OpenConverter
cp D:\a\OpenConverter\OpenConverter\src\build\Release\OpenConverter.exe .
D:\a\_temp\Qt\6.4.3\msvc2019_64\bin\windeployqt.exe .\OpenConverter.exe
cp D:\a\OpenConverter\OpenConverter\ffmpeg\ffmpeg-n4.4.4-94-g5d07afd482-win64-gpl-shared-4.4\bin\*.dll .\
cd D:\deploy
powershell Compress-Archive -Path OpenConverter -DestinationPath OpenConverter_win64.zip

# (Optional) Archive the build artifacts.
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: OpenConverter_win64
path: D:\deploy\OpenConverter_win64.zip

# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3 No newline at end of file

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 10 months ago

To fix the issue, we will add a permissions block at the root level of the workflow file. This block will define the minimal permissions required for the workflow to function correctly. Based on the provided workflow, the primary operations involve checking out the repository, building the project, and uploading artifacts. These operations typically require contents: read and actions: read. No write permissions are necessary unless explicitly required by a specific step.


Suggested changeset 1
.github/workflows/review.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/review.yaml b/.github/workflows/review.yaml
--- a/.github/workflows/review.yaml
+++ b/.github/workflows/review.yaml
@@ -7,2 +7,6 @@
 
+permissions:
+  contents: read
+  actions: read
+
 jobs:
EOF
@@ -7,2 +7,6 @@

permissions:
contents: read
actions: read

jobs:
Copilot is powered by AI and may make mistakes. Always verify output.
@JackLau1222 JackLau1222 requested a review from Jimmy385898 May 2, 2025 08:55
@JackLau1222 JackLau1222 added the feature New Feature label May 2, 2025
@JackLau1222 JackLau1222 changed the title workflows: add windows cd feature: add windows cd May 2, 2025
@JackLau1222 JackLau1222 merged commit 123e8fe into main May 2, 2025
7 checks passed
@JackLau1222 JackLau1222 deleted the win_cd branch May 2, 2025 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants