Skip to content

Commit

Permalink
chore(ci): Using latest image versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mfep committed May 17, 2024
1 parent 0be5131 commit 814fd79
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ on: [push, pull_request]

jobs:
build-linux:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
env:
CC: gcc-13
CXX: g++-13
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
lfs: true
Expand All @@ -17,6 +20,7 @@ jobs:
libfreetype-dev
libsdl2-dev
libspdlog-dev
lsb-release
nlohmann-json3-dev
- name: Configure CMake
run: cmake
Expand All @@ -26,22 +30,22 @@ jobs:
-D MC_COMMIT_SHA=${{github.sha}}
-D MC_BUILD_NUMBER=${{github.run_number}}
-D CPACK_GENERATOR=DEB
-D CPACK_SYSTEM_NAME=ubuntu-22.04
-D CPACK_SYSTEM_NAME=$(lsb_release --codename --short)
- name: Build
run: cmake --build ${{github.workspace}}/build --target midiconn -j `nproc`
- name: Create DEB package
run: cd ${{github.workspace}}/build && cpack -C Release
- name: Upload Artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
path: |
${{github.workspace}}/build/midiconn
${{github.workspace}}/build/*.deb
build-flatpak:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
lfs: true
Expand All @@ -59,17 +63,17 @@ jobs:
run: flatpak-builder build/flatpak ${{github.workspace}}/data/packaging/xyz.safeworlds.midiconn.yml

build-windows:
runs-on: windows-2022
runs-on: windows-latest
env:
vcpkg-prereqs: nlohmann-json:x64-windows spdlog:x64-windows sdl2:x64-windows freetype[core]:x64-windows zlib:x64-windows
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
lfs: true
- name: Restore vcpkg prerequisites cache
id: restore-cache-vcpkg
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: C:\vcpkg
key: ${{env.vcpkg-prereqs}}
Expand All @@ -78,7 +82,7 @@ jobs:
run: vcpkg install ${{env.vcpkg-prereqs}}
- name: Save vcpkg prerequisites cache
if: ${{ steps.restore-cache-vcpkg.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: C:\vcpkg
key: ${{env.vcpkg-prereqs}}
Expand All @@ -97,7 +101,7 @@ jobs:
- name: Build installer
run: cd ${{github.workspace}}\build; cpack -C Release
- name: Upload Artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
path: |
${{github.workspace}}\build\Release\*.exe
Expand All @@ -106,15 +110,15 @@ jobs:
release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs:
- build-linux
- build-windows
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
- name: Create GitHub release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: |
${{github.workspace}}/artifact/*.deb
Expand Down

0 comments on commit 814fd79

Please sign in to comment.