Skip to content

Commit 9f9c17d

Browse files
committed
fix(workflows): update macOS runner references
- Change macOS-latest to macOS-15 in GitHub workflow files - Refactor flag construction in autoconf and FFmpeg builds for better readability - Extract flag variables before formatting strings - Remove macOS deployment target environment variable setting This change ensures consistent runner environments for macOS builds and improves code maintainability.
1 parent 4d1cf3d commit 9f9c17d

6 files changed

Lines changed: 15 additions & 23 deletions

File tree

.github/workflows/ffmpeg-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
runner: macos-15-intel
3333
- os: darwin
3434
arch: arm64
35-
runner: macos-latest
35+
runner: macos-15
3636
fail-fast: false
3737

3838
steps:

.github/workflows/ffmpeg-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runner: macos-15-intel
3232
- os: darwin
3333
arch: arm64
34-
runner: macos-latest
34+
runner: macos-15
3535
fail-fast: false
3636

3737
steps:

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runner: macos-15-intel
2626
- os: darwin
2727
arch: arm64
28-
runner: macos-latest
28+
runner: macos-15
2929
fail-fast: false
3030

3131
steps:

internal/builder/buildsystems.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ func (a *AutoconfBuild) Configure(lib *Library, srcPath, buildDir, installDir st
2626
incDir := filepath.Join(installDir, "include")
2727
libDir := filepath.Join(installDir, "lib")
2828

29+
cflags := fmt.Sprintf("-O3 -I%s", incDir)
30+
cppflags := fmt.Sprintf("-I%s", incDir)
31+
ldflags := fmt.Sprintf("-L%s", libDir)
32+
2933
args = append(args,
30-
fmt.Sprintf("CFLAGS=-O3 -I%s", incDir),
31-
fmt.Sprintf("CPPFLAGS=-I%s", incDir),
32-
fmt.Sprintf("LDFLAGS=-L%s", libDir),
34+
fmt.Sprintf("CFLAGS=%s", cflags),
35+
fmt.Sprintf("CPPFLAGS=%s", cppflags),
36+
fmt.Sprintf("LDFLAGS=%s", ldflags),
3337
)
3438
}
3539

internal/builder/libraries.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,10 +706,13 @@ var ffmpeg = &Library{
706706
incDir := filepath.Join(stagingDir, "include")
707707
libDir := filepath.Join(stagingDir, "lib")
708708

709+
extraCflags := fmt.Sprintf("-I%s", incDir)
710+
extraLdflags := fmt.Sprintf("-L%s", libDir)
711+
709712
args := []string{
710713
"--pkg-config-flags=--static",
711-
fmt.Sprintf("--extra-cflags=-I%s", incDir),
712-
fmt.Sprintf("--extra-ldflags=-L%s", libDir),
714+
fmt.Sprintf("--extra-cflags=%s", extraCflags),
715+
fmt.Sprintf("--extra-ldflags=%s", extraLdflags),
713716
}
714717

715718
// Add common FFmpeg arguments (platform-specific)

internal/builder/library.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -207,20 +207,5 @@ func buildEnv(installDir string) []string {
207207
env = append(env, "PATH="+binPath)
208208
}
209209

210-
// Set minimum macOS deployment target to avoid version mismatch warnings
211-
// This ensures libraries work on macOS 13.0 and later (supports Intel and Apple Silicon)
212-
if runtime.GOOS == "darwin" {
213-
hasDeploymentTarget := false
214-
for _, e := range env {
215-
if strings.HasPrefix(e, "MACOSX_DEPLOYMENT_TARGET=") {
216-
hasDeploymentTarget = true
217-
break
218-
}
219-
}
220-
if !hasDeploymentTarget {
221-
env = append(env, "MACOSX_DEPLOYMENT_TARGET=13.0")
222-
}
223-
}
224-
225210
return env
226211
}

0 commit comments

Comments
 (0)