mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-12 01:36:57 +00:00
Fixed compilation on Github Actions
This commit is contained in:
parent
c27438f864
commit
6caecd5c51
1 changed files with 55 additions and 54 deletions
107
.github/workflows/build.yml
vendored
107
.github/workflows/build.yml
vendored
|
|
@ -20,80 +20,81 @@ jobs:
|
||||||
shorthash: ${{steps.vars.outputs.shorthash}}
|
shorthash: ${{steps.vars.outputs.shorthash}}
|
||||||
commit: ${{steps.vars.outputs.commit}}
|
commit: ${{steps.vars.outputs.commit}}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Commit Count and Git Hash
|
- name: Commit Count and Git Hash
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
echo "shorthash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
echo "shorthash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||||
echo "commit=$(git rev-list --count HEAD)" >> $GITHUB_ENV
|
echo "commit=$(git rev-list --count HEAD)" >> $GITHUB_ENV
|
||||||
echo "shorthash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
echo "shorthash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
echo "commit=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT
|
echo "commit=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
Linux:
|
Linux:
|
||||||
name: Linux
|
name: Linux
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
needs: get-info
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y ninja-build clang lld cmake ccache \
|
sudo apt install -y ninja-build clang lld cmake ccache \
|
||||||
libx11-dev libxext-dev libxrandr-dev libxcursor-dev \
|
libx11-dev libxext-dev libxrandr-dev libxcursor-dev \
|
||||||
libxi-dev libxinerama-dev libwayland-dev libxkbcommon-dev \
|
libxi-dev libxinerama-dev libwayland-dev libxkbcommon-dev \
|
||||||
wayland-protocols git
|
wayland-protocols libgl-dev git
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: cmake -G Ninja -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
run: cmake -G Ninja -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} --parallel $(nproc)
|
run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} --parallel $(nproc)
|
||||||
|
|
||||||
- name: Prepare Artifact Folder
|
- name: Prepare Artifact Folder
|
||||||
run: |
|
run: |
|
||||||
mkdir -p artifact
|
mkdir -p artifact
|
||||||
cp -r ${{env.BUILD_DIR}}/Pound artifact/Pound-x64-${{env.BUILD_TYPE}}
|
cp -r ${{env.BUILD_DIR}}/Pound artifact/Pound-x64-${{env.BUILD_TYPE}}
|
||||||
|
|
||||||
- name: Upload Linux Artifact
|
- name: Upload Linux Artifact
|
||||||
uses: actions/upload-artifact@main
|
uses: actions/upload-artifact@main
|
||||||
with:
|
with:
|
||||||
name: Pound-linux-x64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{needs.get-info.outputs.shorthash}}
|
name: Pound-linux-x64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{needs.get-info.outputs.shorthash}}
|
||||||
path: artifact/
|
path: artifact/
|
||||||
|
|
||||||
Windows:
|
Windows:
|
||||||
name: Windows
|
name: Windows
|
||||||
runs-on: windows-2025
|
runs-on: windows-2025
|
||||||
needs: get-info
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: cmake -G Ninja -B "${{env.BUILD_DIR}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} `
|
run:
|
||||||
-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl `
|
cmake -G Ninja -B "${{env.BUILD_DIR}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} `
|
||||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl `
|
||||||
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build "${{env.BUILD_DIR}}" --config ${{env.BUILD_TYPE}} --parallel $env:NUMBER_OF_PROCESSORS
|
run: cmake --build "${{env.BUILD_DIR}}" --config ${{env.BUILD_TYPE}} --parallel $env:NUMBER_OF_PROCESSORS
|
||||||
|
|
||||||
- name: Prepare Artifact Folder
|
- name: Prepare Artifact Folder
|
||||||
run: |
|
run: |
|
||||||
mkdir -p artifact
|
mkdir -p artifact
|
||||||
cp -r ${{env.BUILD_DIR}}/Pound.exe artifact/Pound-x64-${{env.BUILD_TYPE}}.exe
|
cp -r ${{env.BUILD_DIR}}/Pound.exe artifact/Pound-x64-${{env.BUILD_TYPE}}.exe
|
||||||
|
|
||||||
- name: Upload Windows Artifact
|
- name: Upload Windows Artifact
|
||||||
uses: actions/upload-artifact@main
|
uses: actions/upload-artifact@main
|
||||||
with:
|
with:
|
||||||
name: Pound-win64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{needs.get-info.outputs.shorthash}}
|
name: Pound-win64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{needs.get-info.outputs.shorthash}}
|
||||||
path: artifact/
|
path: artifact/
|
||||||
|
|
||||||
macOS-x86_64:
|
macOS-x86_64:
|
||||||
name: macOS x86_64
|
name: macOS x86_64
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue