Skip to content

Commit b2e1d80

Browse files
committed
Fix build for arm
Added manual rebuild
1 parent fd85e25 commit b2e1d80

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1+
env:
2+
MSYS2_PATH_TYPE: inherit
3+
SDK_VER: 10.0.22621.0
4+
TAG_NAME: ${{ inputs.tag_name||github.ref_name }}
5+
16
name: Build
2-
run-name: Build ${{github.ref_name}}
7+
run-name: Build ${{inputs.tag_name||github.ref_name}}
38

49
on:
510
push:
611
tags: "*"
7-
8-
env:
9-
MSYS2_PATH_TYPE: inherit
12+
workflow_dispatch:
13+
inputs:
14+
tag_name:
15+
description: "Tag"
16+
required: true
1017
jobs:
1118
build:
1219
strategy:
@@ -15,25 +22,20 @@ jobs:
1522
type: [static, shared]
1623
license: [gpl, lgpl]
1724
fail-fast: false
18-
runs-on: windows-latest
25+
runs-on: windows-2022
1926
env:
2027
# amd64_arm,amd64_arm64,x86,amd64
21-
name: ffmpeg-${{ github.ref_name }}-${{matrix.license}}-${{matrix.arch}}-${{matrix.type}}
28+
name: ffmpeg-${{ inputs.tag_name||github.ref_name }}-${{matrix.license}}-${{matrix.arch}}-${{matrix.type}}
2229
target: ${{contains(matrix.arch,'arm')&&format('amd64_{0}',matrix.arch)||matrix.arch}}
2330
steps:
2431
- name: Find MSVC
2532
shell: bash
2633
id: msvc
2734
run: |
2835
echo "installationPath=$(vswhere -all -legacy -property installationPath)">>$GITHUB_OUTPUT
29-
#winget install mesonbuild.meson
30-
# - name: Setup Mesonbuild
31-
# shell: cmd
32-
# run: |
33-
# python3 -m pip install meson
34-
# meson -v
3536
- uses: actions/checkout@v4
3637
with:
38+
ref: ${{env.TAG_NAME}}
3739
submodules: recursive
3840
- uses: msys2/setup-msys2@v2
3941
with:
@@ -45,14 +47,23 @@ jobs:
4547
yasm
4648
nasm
4749
50+
- name: Rebase
51+
if: ${{inputs.tag_name}}
52+
shell: msys2 {0}
53+
run: |
54+
cd FFmpeg
55+
git fetch --tags
56+
git checkout ${{inputs.tag_name}}
57+
git submodule update --init --recursive --depth 1
58+
4859
- name: Remove MSYS2 link
4960
shell: msys2 {0}
5061
run: rm $(which link)
5162

5263
- name: Build
5364
shell: cmd
5465
run: |
55-
CALL "${{steps.msvc.outputs.installationPath}}\VC\Auxiliary\Build\vcvarsall.bat" ${{env.target}}
66+
CALL "${{steps.msvc.outputs.installationPath}}\VC\Auxiliary\Build\vcvarsall.bat" ${{env.target}} ${{env.SDK_VER}}
5667
msys2 -c "./build.sh ${{matrix.arch}} ${{matrix.type}} ${{matrix.license}}"
5768
- name: Debug log
5869
if: ${{ failure() }}
@@ -72,11 +83,12 @@ jobs:
7283
sha1sum ${{env.name}}.zip ${{env.name}}.tar.gz >${{env.name}}.sha1
7384
./build-changelog.sh > changelog
7485
- name: Release
75-
if: startsWith(github.ref, 'refs/tags/')
86+
if: ${{startsWith(github.ref, 'refs/tags/')||inputs.tag_name}}
7687
uses: softprops/action-gh-release@v2
7788
with:
89+
tag_name: ${{env.TAG_NAME}}
7890
body_path: changelog
79-
prerelease: ${{contains(github.ref_name,'dev')}}
91+
prerelease: ${{contains(env.TAG_NAME,'dev')}}
8092
files: |
8193
${{env.name}}.zip
8294
${{env.name}}.tar.gz

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# FFmpeg Builder (with MSVC)
1+
# FFmpeg Builder
22

33
[![Build FFmpeg](https://github.com/System233/ffmpeg-builds/actions/workflows/build.yml/badge.svg)](https://github.com/System233/ffmpeg-builds/actions/workflows/build.yml)
44

@@ -7,7 +7,7 @@ Build results: [Download](https://github.com/System233/ffmpeg-msvc-prebuilt/rele
77
## Build Info
88

99
- Binaries: Now includes ffmpeg, ffplay and ffprobe executable files, as well as related header files and lib.
10-
- Arch support: x64, x86, arm and arm64 (since most runners in Github Action do not have Windows arm SDK, arm builds are not 100% successful).
10+
- Arch support: x64, x86, arm and arm64.
1111
- Linker: static, shared
1212
- License: GPLv3, LGPLv2.1
1313

0 commit comments

Comments
 (0)