use newer actions/checkout version for CI

This commit is contained in:
Martin Michelsen
2023-12-18 13:40:13 -08:00
parent 0ec685cbd0
commit 592b013f65
+32 -32
View File
@@ -2,9 +2,9 @@ name: CMake
on: on:
push: push:
branches: [ master ] branches: [master]
pull_request: pull_request:
branches: [ master ] branches: [master]
env: env:
BUILD_TYPE: Release BUILD_TYPE: Release
@@ -16,42 +16,42 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, macos-latest] os: [ubuntu-latest, macos-latest]
with_resource_file: ['true', 'false'] with_resource_file: ["true", "false"]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Install libraries (Linux) - name: Install libraries (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }} if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install -y libevent-dev run: sudo apt-get install -y libevent-dev
- name: Install libraries (macOS) - name: Install libraries (macOS)
if: ${{ matrix.os == 'macos-latest' }} if: ${{ matrix.os == 'macos-latest' }}
run: brew install libevent run: brew install libevent
- name: Install phosg - name: Install phosg
run: | run: |
git clone https://github.com/fuzziqersoftware/phosg.git git clone https://github.com/fuzziqersoftware/phosg.git
cd phosg cd phosg
cmake . cmake .
make make
sudo make install sudo make install
- name: Install resource_file - name: Install resource_file
if: ${{ matrix.with_resource_file == 'true' }} if: ${{ matrix.with_resource_file == 'true' }}
run: | run: |
git clone https://github.com/fuzziqersoftware/resource_dasm.git git clone https://github.com/fuzziqersoftware/resource_dasm.git
cd resource_dasm cd resource_dasm
cmake . cmake .
make make
sudo make install sudo make install
- name: Configure CMake - name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build - name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test - name: Test
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure