Skip to content

Commit f58eb16

Browse files
authored
Update github actions (#68)
* Update ubuntu action * Update github actions version * Update windows action * Remove unity build for windows
1 parent 877e07e commit f58eb16

File tree

2 files changed

+14
-21
lines changed

2 files changed

+14
-21
lines changed

.github/workflows/ubuntu.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,26 @@ env:
1111

1212
jobs:
1313
build:
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-22.04
1515
steps:
1616
- name: Install dependencies
1717
run: |
18-
sudo apt update
19-
sudo apt install -y libsdl2-dev libboost-dev libfreetype6-dev zlib1g-dev libpugixml-dev
18+
sudo apt-get update
19+
sudo apt-get install -y libsdl2-dev libboost-dev libfreetype6-dev zlib1g-dev libpugixml-dev
2020
2121
- name: Extract branch name
2222
shell: bash
23-
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
23+
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
2424
id: extract_branch
2525

26-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v3
2727
with:
2828
repository: GamedevFramework/gf
2929
submodules: recursive
3030
ref: ${{ steps.extract_branch.outputs.branch }}
3131

32-
- name: CMake hack for Ubuntu
33-
shell: bash
34-
working-directory: ${{ github.workspace }}
35-
run: |
36-
cat library/CMakeLists.txt | sed 's/SDL2::SDL2/\$\{SDL2_LIBRARIES\}/' | tee library/CMakeLists.txt > /dev/null
37-
echo 'include_directories(SYSTEM ${SDL2_INCLUDE_DIRS})' >> library/CMakeLists.txt
38-
3932
- name: Configure gf
40-
run: cmake -DGF_BUILD_GAMES=OFF -DGF_BUILD_EXAMPLES=OFF -DGF_BUILD_DOCUMENTATION=OFF -DGF_SINGLE_COMPILTATION_UNIT=OFF -DGF_DEBUG=OFF -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -S ${{ github.workspace }} -B ${{ github.workspace }}/build
33+
run: cmake -DGF_BUILD_GAMES=OFF -DGF_BUILD_EXAMPLES=OFF -DGF_BUILD_DOCUMENTATION=OFF -DGF_DEBUG=OFF -DCMAKE_UNITY_BUILD=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -S ${{ github.workspace }} -B ${{ github.workspace }}/build
4134

4235
- name: Build gf
4336
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel
@@ -50,7 +43,7 @@ jobs:
5043
working-directory: ${{github.workspace}}/build
5144
run: cpack --config CPackConfig.cmake -C ${{env.BUILD_TYPE}}
5245

53-
- uses: actions/upload-artifact@v2
46+
- uses: actions/upload-artifact@v3
5447
with:
5548
name: deb-file
5649
path: ${{github.workspace}}/build/*.deb

.github/workflows/windows.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
BUILD_TYPE: Release
11-
VCPKG_COMMIT: af2287382b1991dbdcb7e5112d236f3323b9dd7a
11+
VCPKG_COMMIT: f14984af3738e69f197bf0e647a8dca12de92996
1212
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}\vcpkg\binary-cache
1313

1414
jobs:
@@ -17,12 +17,12 @@ jobs:
1717
steps:
1818
- name: vcpkg cache
1919
id: cache-vcpkg
20-
uses: actions/cache@v2.1.6
20+
uses: actions/cache@v3
2121
with:
2222
path: vcpkg
23-
key: ${{ runner.os }}-vcpkg-${{ env.VCPKG_COMMIT }}-v1
23+
key: ${{ runner.os }}-vcpkg-${{ env.VCPKG_COMMIT }}
2424

25-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
2626
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
2727
with:
2828
repository: Microsoft/vcpkg
@@ -40,10 +40,10 @@ jobs:
4040
4141
- name: Extract branch name
4242
shell: bash
43-
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
43+
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
4444
id: extract_branch
4545

46-
- uses: actions/checkout@v2
46+
- uses: actions/checkout@v3
4747
with:
4848
repository: GamedevFramework/gf
4949
submodules: recursive
@@ -54,7 +54,7 @@ jobs:
5454
shell: cmd
5555
run: |
5656
set PATH=%PATH%;${{github.workspace}}/gf/build/library/${{ env.BUILD_TYPE }}
57-
cmake -DGF_BUILD_GAMES=OFF -DGF_BUILD_EXAMPLES=OFF -DGF_BUILD_DOCUMENTATION=OFF -DGF_SINGLE_COMPILTATION_UNIT=OFF -DGF_DEBUG=OFF -DGF_VCPKG=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake -S ${{ github.workspace }}/gf -B ${{ github.workspace }}/gf/build
57+
cmake -DGF_USE_EMBEDDED_LIBS=OFF -DGF_BUILD_GAMES=OFF -DGF_BUILD_EXAMPLES=OFF -DGF_BUILD_DOCUMENTATION=OFF -DGF_DEBUG=OFF -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake -S ${{ github.workspace }}/gf -B ${{ github.workspace }}/gf/build
5858
5959
- name: Build gf
6060
shell: cmd

0 commit comments

Comments
 (0)