Skip to content

Commit 336139a

Browse files
committed
Simplify and modernize CI
Don't create unnecessary environment variables. Don't install packages that are already installed on the runners. Query Homebrew for prefix path. Use latest version of checkout action.
1 parent 812bafa commit 336139a

1 file changed

Lines changed: 13 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
pull_request:
77
branches: [ master ]
88

9-
env:
10-
BUILD_TYPE: Release
11-
129
jobs:
1310
build:
1411
strategy:
@@ -18,30 +15,29 @@ jobs:
1815
- macos-latest
1916
include:
2017
- os: ubuntu-latest
21-
blocks: -DUNICODE_BLOCKS=/usr/share/unicode/Blocks.txt
22-
install_packages: >
23-
sudo apt update &&
24-
sudo apt install cmake gettext libcairo2-dev libglib2.0-dev libfreetype6-dev libpango1.0-dev ninja-build pkg-config unicode-data
18+
cmake_extra_args: -DUNICODE_BLOCKS=/usr/share/unicode/Blocks.txt
19+
install_packages: |
20+
sudo apt update
21+
sudo apt install gettext libcairo2-dev libglib2.0-dev libfreetype6-dev libpango1.0-dev unicode-data
2522
- os: macos-latest
26-
env:
27-
- CMAKE_PREFIX_PATH: /usr/local/opt/gettext
28-
install_packages: >
29-
brew update &&
30-
brew install cairo cmake fontconfig freetype gettext glib pango ninja pkg-config
23+
cmake_extra_args: -DCMAKE_PREFIX_PATH=$(brew --prefix gettext)
24+
install_packages: |
25+
brew update
26+
brew install cairo fontconfig freetype gettext glib pango pkg-config
3127
32-
runs-on: ${{matrix.os}}
28+
runs-on: ${{ matrix.os }}
3329

3430
steps:
35-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v4
3632

3733
- name: Install Packages
3834
run: ${{ matrix.install_packages }}
3935

4036
- name: Configure
41-
run: cmake -GNinja -B${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} ${{ matrix.blocks }}
37+
run: cmake -GNinja -Bbuild -Wdev -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_extra_args }}
4238

4339
- name: Build
44-
run: cmake --build ${{ github.workspace }}/build -v
40+
run: cmake --build build -v
4541

4642
- name: Test
47-
run: ${{ github.workspace }}/build/src/fntsample --help
43+
run: build/src/fntsample --help

0 commit comments

Comments
 (0)