Skip to content

Commit

Permalink
Update autoformat.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rdw-software committed Oct 18, 2024
1 parent f630316 commit 94531d4
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/autoformat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
stylua: stylua-linux.zip
Expand All @@ -36,7 +36,7 @@ jobs:
shell: ${{ matrix.shell }}

steps:
- name: Set up MSYS2 environment
- name: Install clang-format (via MSYS)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
Expand All @@ -55,7 +55,7 @@ jobs:
fetch-depth: 1
submodules: false

- name: Source environment variables
- name: Load environment variables
run: |
set -a
source .github/autoformat.env
Expand All @@ -73,11 +73,11 @@ jobs:
./stylua --version
# The preinstalled version is positively antique; replace with the pinned version (to match MSYS)
- name: Install clang-format (via APT)
- name: Install clang-format (Linux)
if: runner.os == 'Linux'
run: sudo ./deps/install-clang-format.sh

- name: Install clang-format (via Homebrew)
- name: Install clang-format (macOS)
if: runner.os == 'macOS'
run: |
set -eu
Expand All @@ -87,11 +87,7 @@ jobs:
- name: Create versioned clang-format alias
if: runner.os != 'Linux'
run: |
set -eu
echo $(which clang-format)
ls -l "$(dirname "$(which clang-format)")"
ln -s "$(which clang-format)" "$(which clang-format)"-${{ env.EVO_CLANGFORMAT_VERSION }}
run: ln -s "$(which clang-format)" "$(which clang-format)"-${{ env.EVO_CLANGFORMAT_VERSION }}

- name: Verify clang-format version
run: clang-format --version && clang-format-${{ env.EVO_CLANGFORMAT_VERSION }} --version
Expand Down

0 comments on commit 94531d4

Please sign in to comment.