Skip to content

Commit

Permalink
Switch more GitHub Actions to pkgx
Browse files Browse the repository at this point in the history
- Updated the version of clang-format-action from v4.5.0 to v4.11.0.
- Changed the GCC version in setup-gcc action from 11 to 13.
- Updated the version of cpp-linter-action from v2 to v3.
- Removed unnecessary steps related to GCC setup in codeql-analysis.yml and sonarcloud.yml workflows.
- Added a step to print the GCC version using "gcc --version" command.

Note: These changes improve compatibility and enhance code formatting and linting processes.
  • Loading branch information
acgetchell committed Oct 6, 2023
1 parent 7f7323d commit dd1dd05
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/clang-format-action@v4.5.0
uses: jidicula/clang-format-action@v4.11.0
with:
clang-format-version: '16'
check-path: ${{ matrix.path }}
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/codecov-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ jobs:
with:
fetch-depth: 0

- name: Setup GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 11
platform: x64

- name: Setup
run: |
sudo apt update
sudo apt upgrade
sudo apt-get install build-essential automake autoconf autoconf-archive texinfo libtool-bin yasm ninja-build ccache
- name: Setup GCC
uses: pkgxdev/setup@v1
with:
+: gcc@13

- run: gcc --version

- name: Restore artifacts or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,18 @@ jobs:
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Setup GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 12
platform: x64

- name: Setup
run: |
sudo apt update
sudo apt-get install build-essential automake autoconf autoconf-archive texinfo libtool-bin yasm ninja-build ccache
- name: Setup GCC
uses: pkgxdev/setup@v1
with:
+: gcc@13

- run: gcc --version

- name: Restore artifacts or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cpp-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cpp-linter/cpp-linter-action@v2
- uses: cpp-linter/cpp-linter-action@v3
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
tidy-checks: ''
version: 15
version: 16

- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
Expand Down
23 changes: 12 additions & 11 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,24 @@ jobs:
with:
fetch-depth: 0

- name: Setup
run: |
sudo apt update
sudo apt-get install build-essential automake autoconf autoconf-archive texinfo libtool-bin yasm ninja-build ccache lcov
- name: Setup GCC
uses: pkgxdev/setup@v1
with:
+: gcc@13

- run: gcc --version

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'oracle'
java-version: '17'

- name: Setup GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 11
platform: x64

- name: Setup
run: |
sudo apt update
sudo apt-get install build-essential automake autoconf autoconf-archive texinfo libtool-bin yasm ninja-build ccache lcov
- name: Install sonar-scanner and build-wrapper
uses: sonarsource/sonarcloud-github-c-cpp@v1

Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/windows-pkgx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Windows pkgx

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: windows-latest

env:
VCPKG_DEFAULT_TRIPLET: x64-windows
VCPKG_ROOT: C:\vcpkg

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true

- name: Setup Clang
uses: pkgxdev/setup@v1
with:
+: clang@16

- name: Restore artifacts, or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 4d999187501e852f76457306b35627dbe63895cd

- name: Install vcpkg packages and configure CMake
run: |
vcpkg install
cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo -D ENABLE_TESTING:BOOL=TRUE -D ENABLE_CACHE:BOOL=FALSE -S . -B build
- name: Build
run: cmake --build build

0 comments on commit dd1dd05

Please sign in to comment.