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