Browse Source

build windows artifacts on linux (#2237)

pull/2238/head
Jason Dove 2 weeks ago committed by GitHub
parent
commit
baf7aa20d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 24
      .github/workflows/artifacts.yml
  2. 6
      .github/workflows/pr.yml

24
.github/workflows/artifacts.yml

@ -46,7 +46,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
submodules: true submodules: true
- name: Setup .NET Core - name: Setup dotnet
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v4
with: with:
dotnet-version: 9.0.203 dotnet-version: 9.0.203
@ -157,7 +157,7 @@ jobs:
- os: ubuntu-24.04-arm - os: ubuntu-24.04-arm
kind: linux kind: linux
target: linux-arm64 target: linux-arm64
- os: windows-latest - os: ubuntu-latest
kind: windows kind: windows
target: win-x64 target: win-x64
steps: steps:
@ -166,11 +166,25 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup .NET Core - name: Setup dotnet
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v4
with: with:
dotnet-version: 9.0.203 dotnet-version: 9.0.203
- name: Set up MinGW
if: ${{ matrix.target == 'win-x64' }}
uses: egor-tensin/setup-mingw@v2
with:
platform: x64
- name: Setup Windows Cross-Compile Tools
if: ${{ matrix.target == 'win-x64' }}
run: |
rustup target add x86_64-pc-windows-gnu
mkdir -p .cargo
echo '[target.x86_64-pc-windows-gnu]' >> .cargo/config.toml
echo 'linker = "x86_64-w64-mingw32-gcc"' >> .cargo/config.toml
- name: Clean - name: Clean
run: dotnet clean --configuration Release && dotnet nuget locals all --clear run: dotnet clean --configuration Release && dotnet nuget locals all --clear
@ -199,7 +213,7 @@ jobs:
# Build Windows launcher # Build Windows launcher
if [ "${{ matrix.kind }}" == "windows" ]; then if [ "${{ matrix.kind }}" == "windows" ]; then
cargo build --manifest-path=ErsatzTV-Windows/Cargo.toml --release --all-features & cargo build --manifest-path=ErsatzTV-Windows/Cargo.toml --release --all-features --target x86_64-pc-windows-gnu &
fi fi
wait wait
@ -210,7 +224,7 @@ jobs:
if [ "${{ matrix.kind }}" == "windows" ]; then if [ "${{ matrix.kind }}" == "windows" ]; then
ls -l ErsatzTV-Windows/target/release ls -l ErsatzTV-Windows/target/release
mv ErsatzTV-Windows/target/release/ersatztv_windows.exe "$release_name/ErsatzTV-Windows.exe" mv ErsatzTV-Windows/target/x86_64-pc-windows-gnu/release/ersatztv_windows.exe "$release_name/ErsatzTV-Windows.exe"
# Download ffmpeg # Download ffmpeg
7z e "ffmpeg/${{ steps.downloadffmpeg.outputs.filename }}" -o"$release_name" '*.exe' -r 7z e "ffmpeg/${{ steps.downloadffmpeg.outputs.filename }}" -o"$release_name" '*.exe' -r

6
.github/workflows/pr.yml

@ -8,7 +8,7 @@ jobs:
- name: Get the sources - name: Get the sources
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup .NET Core - name: Setup dotnet
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v4
with: with:
dotnet-version: 9.0.203 dotnet-version: 9.0.203
@ -49,7 +49,7 @@ jobs:
- name: Get the sources - name: Get the sources
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup .NET Core - name: Setup dotnet
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v4
with: with:
dotnet-version: 9.0.203 dotnet-version: 9.0.203
@ -77,7 +77,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
submodules: true submodules: true
- name: Setup .NET Core - name: Setup dotnet
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v4
with: with:
dotnet-version: 9.0.203 dotnet-version: 9.0.203

Loading…
Cancel
Save