Debian Codegraph @

.github/workflows/build.yml

raw symbols SCIP
1 name: Build
2
3 on: [push, pull_request]
4
5 jobs:
6 build-linux:
7 runs-on: ubuntu-latest
8 steps:
9 - uses: actions/checkout@v4
10 - name: Dependencies
11 run: |
12 sudo apt-get update
13 sudo apt install \
14 libglib2.0-dev \
15 libgirepository1.0-dev \
16 duktape-dev \
17 meson \
18 gcovr \
19 gi-docgen \
20 gsettings-desktop-schemas-dev \
21 libcurl4-openssl-dev \
22 valac
23 - name: Build setup
24 run: meson setup build -Db_coverage=true
25 - name: Build
26 run: ninja -C build
27 - name: Tests and Coverage
28 run: |
29 ninja test -C build
30 ninja coverage -C build
31 - name: Upload artifact
32 uses: actions/upload-pages-artifact@v3
33 with:
34 path: ./build/docs/libproxy-1.0/
35 if-no-files-found: error
36 - name: CodeCov
37 uses: codecov/codecov-action@v4
38 with:
39 token: ${{ secrets.CODECOV_TOKEN }} # required
40
41 build-osx:
42 runs-on: macos-latest
43 steps:
44 - uses: actions/checkout@v4
45 - uses: actions/setup-python@v5
46 with:
47 python-version: |
48 3.12
49 - name: Setup
50 run: |
51 pip install meson ninja
52 brew install gobject-introspection duktape gcovr gi-docgen vala gsettings-desktop-schemas
53 - name: Build and Test
54 run: |
55 meson setup build -Ddocs=false
56 ninja -C build
57 ninja -C build test
58
59 build-windows:
60 runs-on: windows-latest
61 continue-on-error: true
62 defaults:
63 run:
64 shell: msys2 {0}
65 steps:
66 - uses: msys2/setup-msys2@v2
67 with:
68 msystem: MINGW64
69 install: >-
70 base-devel
71 git
72 mingw-w64-x86_64-toolchain
73 mingw-w64-x86_64-ccache
74 mingw-w64-x86_64-pkg-config
75 mingw-w64-x86_64-gobject-introspection
76 mingw-w64-x86_64-python-gobject
77 mingw-w64-x86_64-meson
78 mingw-w64-x86_64-glib2
79 mingw-w64-x86_64-duktape
80 mingw-w64-x86_64-gi-docgen
81 mingw-w64-x86_64-curl
82 mingw-w64-x86_64-vala
83 mingw-w64-x86_64-gsettings-desktop-schemas
84 - uses: actions/checkout@v4
85 - uses: actions/setup-python@v5
86 with:
87 python-version: '3.9'
88 - name: Build and Test
89 # Disable docs for the moment until msys2 gi-docgen update has landed
90 run: |
91 meson setup build -Ddocs=false
92 ninja -C build
93 ninja -C build test
94
95 # Deploy job
96 deploy:
97 # needs: [build-linux, build-osx, build-windows]
98 needs: build-linux
99 if: github.ref == 'refs/heads/main'
100
101 permissions:
102 pages: write # to deploy to Pages
103 id-token: write # to verify the deployment originates from an appropriate source
104
105 environment:
106 name: github-pages
107 url: ${{ steps.deployment.outputs.page_url }}
108
109 runs-on: ubuntu-latest
110 steps:
111 - name: Deploy to GitHub Pages
112 id: deployment
113 uses: actions/deploy-pages@v4