Skip to content

Commit

Permalink
attempt nexgen999#1 to fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
otavepto committed Jun 2, 2024
1 parent cfbeff9 commit 989bbf8
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 30 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/emu-build-all-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions:
contents: write

env:
PREMAKE_ACTION: gmake2
DEPS_CACHE_KEY: emu-deps-linux
DEPS_CACHE_DIR: build/deps/linux

Expand All @@ -34,7 +35,7 @@ jobs:
matrix:
prj: [
# regular api
'api_regular', 'steamclient_regular_linux',
'api_regular', 'steamclient_regular',
# api + client (experimental)
'api_experimental', 'steamclient_experimental',
# tools
Expand All @@ -54,13 +55,8 @@ jobs:
id: emu-deps-cache-step
uses: actions/cache@v4
with:
key: ${{ env.DEPS_CACHE_KEY }}
path: ${{ env.DEPS_CACHE_DIR }}

## mandatory Linux packages, installed via sudo apt install ...
- name: Install required packages
shell: bash
run: sudo chmod 777 build_linux_deps.sh && sudo ./build_linux_deps.sh -verbose -packages_only
key: ${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }}
path: ${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }}

## extra helpers/tools, these are not built inside the deps build dir
- name: Clone third-party build helpers (common/linux)
Expand All @@ -80,11 +76,23 @@ jobs:
- name: Give all permissions to repo folder
shell: bash
working-directory: ${{ github.workspace }}
run: sudo chmod -R 777 "${{ github.workspace }}"
run: sudo chmod -R 777 "${{ github.workspace }}"

## mandatory Linux packages
- name: Install required packages
shell: bash
run: |
sudo apt install -y coreutils # echo, printf, etc...
sudo apt install -y build-essential
sudo apt install -y gcc-multilib # needed for 32-bit builds
sudo apt install -y g++-multilib
# sudo apt install -y clang
sudo apt install -y libglx-dev # needed for overlay build (header files such as GL/glx.h)
sudo apt install -y libgl-dev # needed for overlay build (header files such as GL/gl.h)
# sudo apt install -y binutils # (optional) contains the tool 'readelf' mainly, and other usefull binary stuff
### generate project files
## TODO gen proto action is broken, always returns error = 1
- name: Generate project files
### generate from .proto file
- name: Generate from .proto file
shell: bash
working-directory: ${{ github.workspace }}
run: |
Expand All @@ -98,9 +106,9 @@ jobs:
working-directory: ${{ github.workspace }}/build/project/gmake2/linux
run: |
echo "dry run..."
CC=clang CXX=clang++ make -n -j 2 config=${{ matrix.cfg }}_${{ matrix.arch }} ${{ matrix.prj }}
make -n -j 2 config=${{ matrix.cfg }}_${{ matrix.arch }} ${{ matrix.prj }}
echo "actual run..."
CC=clang CXX=clang++ make -j 2 config=${{ matrix.cfg }}_${{ matrix.arch }} ${{ matrix.prj }}
make -j 2 config=${{ matrix.cfg }}_${{ matrix.arch }} ${{ matrix.prj }}
### upload artifact/package to github Actions (for targets)
- name: Upload build package (for targets)
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/emu-build-all-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions:
contents: write

env:
PREMAKE_ACTION: vs2022
DEPS_CACHE_KEY: emu-deps-win
DEPS_CACHE_DIR: build/deps/win

Expand All @@ -34,11 +35,11 @@ jobs:
prj: [
# regular api
'api_regular',
# api + client (experimental)
'api_experimental', 'steamclient_experimental_stub_win',
# (experimental) api + client
'api_experimental', 'steamclient_experimental_stub',
# client (experimental) + loader + extra dll + gameoverlaylib
'steamclient_experimental', 'steamclient_experimental_loader_win',
'steamclient_experimental_extra_win', 'lib_game_overlay_renderer',
'steamclient_experimental', 'steamclient_experimental_loader',
'steamclient_experimental_extra', 'lib_game_overlay_renderer',
# tools
'tool_lobby_connect', 'tool_generate_interfaces',
]
Expand Down Expand Up @@ -68,8 +69,8 @@ jobs:
id: emu-deps-cache-step
uses: actions/cache@v4
with:
key: ${{ env.DEPS_CACHE_KEY }}
path: ${{ env.DEPS_CACHE_DIR }}
key: ${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }}
path: ${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }}

## extra helpers/tools, these are not built inside the deps build dir
- name: Clone third-party build helpers (common/win)
Expand All @@ -84,14 +85,13 @@ jobs:
ref: 'third-party/build/win'
path: "${{env.THIRD_PARTY_BASE_DIR}}/build/win"

### generate project files
## TODO gen proto action is broken, always returns error = 1
- name: Generate project files
### generate from .proto file
- name: Generate from .proto file
shell: cmd
working-directory: ${{ github.workspace }}
run: |
"${{env.THIRD_PARTY_BASE_DIR}}\common\win\premake\premake5.exe" --file=premake5.lua --os=windows genproto
"${{env.THIRD_PARTY_BASE_DIR}}\common\win\premake\premake5.exe" --file=premake5.lua --emubuild=${{ github.sha }} --os=windows vs2022
"${{env.THIRD_PARTY_BASE_DIR}}\common\win\premake\premake5.exe" --file=premake5.lua --emubuild=${{ github.sha }} --dosstub --winrsrc --winsign --os=windows vs2022
### build target(s)
- name: Build target(s)
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/emu-deps-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions:
contents: write

env:
PREMAKE_ACTION: gmake2
DEPS_CACHE_KEY: emu-deps-linux
DEPS_CACHE_DIR: build/deps/linux

Expand All @@ -26,8 +27,8 @@ jobs:
id: emu-deps-cache-step
uses: actions/cache@v4
with:
key: ${{ env.DEPS_CACHE_KEY }}
path: ${{ env.DEPS_CACHE_DIR }}
key: ${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }}
path: ${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }}

# we need branch because it has build scripts
- name: Checkout branch
Expand Down Expand Up @@ -56,7 +57,24 @@ jobs:
working-directory: ${{ github.workspace }}
run: sudo chmod -R 777 "${{ github.workspace }}"

## mandatory Linux packages
- name: Install required packages
shell: bash
run: |
sudo apt install -y coreutils # echo, printf, etc...
sudo apt install -y build-essential
sudo apt install -y gcc-multilib # needed for 32-bit builds
sudo apt install -y g++-multilib
# sudo apt install -y clang
sudo apt install -y libglx-dev # needed for overlay build (header files such as GL/glx.h)
sudo apt install -y libgl-dev # needed for overlay build (header files such as GL/gl.h)
# sudo apt install -y binutils # (optional) contains the tool 'readelf' mainly, and other usefull binary stuff
- name: Build deps
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
shell: bash
run: sudo chmod 777 build_linux_deps.sh && sudo ./build_linux_deps.sh -verbose
working-directory: ${{ github.workspace }}
run: |
export CMAKE_GENERATOR="Unix Makefiles"
sudo chmod 777 ./${{env.THIRD_PARTY_BASE_DIR}}/common/linux/premake/premake5
./${{env.THIRD_PARTY_BASE_DIR}}/common/linux/premake/premake5 --file=premake5-deps.lua --64-build --32-build --all-ext --all-build --verbose --clean --os=linux gmake2
10 changes: 7 additions & 3 deletions .github/workflows/emu-deps-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions:
contents: write

env:
PREMAKE_ACTION: vs2022
DEPS_CACHE_KEY: emu-deps-win
DEPS_CACHE_DIR: build/deps/win

Expand All @@ -35,8 +36,8 @@ jobs:
id: emu-deps-cache-step
uses: actions/cache@v4
with:
key: ${{ env.DEPS_CACHE_KEY }}
path: ${{ env.DEPS_CACHE_DIR }}
key: ${{ env.DEPS_CACHE_KEY }}-${{ env.PREMAKE_ACTION }}
path: ${{ env.DEPS_CACHE_DIR }}/${{ env.PREMAKE_ACTION }}
lookup-only: true # don't restore cache if found

# we need branch because it has build scripts
Expand Down Expand Up @@ -69,4 +70,7 @@ jobs:
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
shell: cmd
working-directory: ${{ github.workspace }}
run: build_win_deps.bat -verbose
run: |
build_win_deps.bat -verbose
set "CMAKE_GENERATOR=Visual Studio 17 2022"
"${{env.THIRD_PARTY_BASE_DIR}}\common\win\premake\premake5.exe" --file=premake5-deps.lua --64-build --32-build --all-ext --all-build --verbose --clean --os=windows vs2022

0 comments on commit 989bbf8

Please sign in to comment.