|
1 | 1 | name: Continuous Integration
|
2 | 2 | on:
|
3 |
| - push: |
4 |
| - pull_request: |
5 |
| - schedule: |
6 |
| - - cron: "0 0 1,15 * *" |
| 3 | + push: |
| 4 | + pull_request: |
| 5 | + schedule: |
| 6 | + - cron: "0 0 1,15 * *" |
7 | 7 |
|
8 | 8 | jobs:
|
9 |
| - test: |
10 |
| - runs-on: ${{ matrix.os }} |
11 |
| - strategy: |
12 |
| - fail-fast: false |
13 |
| - matrix: |
14 |
| - os: [ubuntu-latest, windows-latest, macOS-latest] |
15 |
| - rust: [stable, beta, nightly] |
| 9 | + test: |
| 10 | + runs-on: ${{ matrix.os }} |
| 11 | + strategy: |
| 12 | + fail-fast: false |
| 13 | + matrix: |
| 14 | + os: [ubuntu-latest, windows-latest, macOS-latest] |
| 15 | + rust: [stable, beta, nightly] |
| 16 | + # "verbose" just means debug mode here, it's effectively a no-op flag |
| 17 | + release: [verbose, release] |
16 | 18 |
|
17 |
| - steps: |
18 |
| - - uses: actions/checkout@v1 |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v1 |
19 | 21 |
|
20 |
| - # lunix deps |
21 |
| - - name: (Lunix) Install Gtk build environment |
22 |
| - if: matrix.os == 'ubuntu-latest' |
23 |
| - run: | |
24 |
| - sudo apt-get update |
25 |
| - sudo apt-get install -y libgtk-3-dev |
| 22 | + # lunix deps |
| 23 | + - name: (Lunix) Install Gtk build environment |
| 24 | + if: matrix.os == 'ubuntu-latest' |
| 25 | + run: | |
| 26 | + sudo apt-get update |
| 27 | + sudo apt-get install -y libgtk-3-dev |
26 | 28 |
|
27 |
| - # mac deps |
28 |
| - - name: (macOS) Install Gtk build environment |
29 |
| - if: matrix.os == 'macOS-latest' |
30 |
| - run: | |
31 |
| - brew install gtk+3 |
| 29 | + # mac deps |
| 30 | + - name: (macOS) Install Gtk build environment |
| 31 | + if: matrix.os == 'macOS-latest' |
| 32 | + run: | |
| 33 | + brew install gtk+3 |
32 | 34 |
|
33 |
| - # check windows deps |
34 |
| - - name: (Windows) Check available Gtk version |
35 |
| - if: matrix.os == 'windows-latest' |
36 |
| - shell: pwsh |
37 |
| - run: | |
38 |
| - vcpkg search gtk | Select-String "^gtk " > gtk-version.txt |
39 |
| - Get-Content gtk-version.txt |
| 35 | + # check windows deps |
| 36 | + - name: (Windows) Check available Gtk version |
| 37 | + if: matrix.os == 'windows-latest' |
| 38 | + shell: pwsh |
| 39 | + run: | |
| 40 | + vcpkg search gtk | Select-String "^gtk " > gtk-version.txt |
| 41 | + Get-Content gtk-version.txt |
40 | 42 |
|
41 |
| - # cache windows deps |
42 |
| - - name: (Windows) Cache vcpkg packages |
43 |
| - if: matrix.os == 'windows-latest' |
44 |
| - id: cache-vcpkg |
45 |
| - uses: actions/cache@v1 |
46 |
| - with: |
47 |
| - path: C:\vcpkg\installed |
48 |
| - key: ${{ runner.os }}-vcpkg-gtk-${{ hashFiles('gtk-version.txt') }} |
| 43 | + # cache windows deps |
| 44 | + - name: (Windows) Cache vcpkg packages |
| 45 | + if: matrix.os == 'windows-latest' |
| 46 | + id: cache-vcpkg |
| 47 | + uses: actions/cache@v1 |
| 48 | + with: |
| 49 | + path: C:\vcpkg\installed |
| 50 | + key: ${{ runner.os }}-vcpkg-gtk-${{ hashFiles('gtk-version.txt') }} |
49 | 51 |
|
50 |
| - # windows deps |
51 |
| - - name: (Windows) Install Gtk build environment |
52 |
| - if: matrix.os == 'windows-latest' && steps.cache-vcpkg.outputs.cache-hit != 'true' |
53 |
| - run: | |
54 |
| - vcpkg install gtk:x64-windows |
55 |
| - copy C:\vcpkg\installed\x64-windows\lib\gtk-3.0.lib C:\vcpkg\installed\x64-windows\lib\gtk-3.lib |
56 |
| - copy C:\vcpkg\installed\x64-windows\lib\gdk-3.0.lib C:\vcpkg\installed\x64-windows\lib\gdk-3.lib |
| 52 | + # windows deps |
| 53 | + - name: (Windows) Install Gtk build environment |
| 54 | + if: matrix.os == 'windows-latest' && steps.cache-vcpkg.outputs.cache-hit != 'true' |
| 55 | + run: | |
| 56 | + vcpkg install gtk:x64-windows |
| 57 | + copy C:\vcpkg\installed\x64-windows\lib\gtk-3.0.lib C:\vcpkg\installed\x64-windows\lib\gtk-3.lib |
| 58 | + copy C:\vcpkg\installed\x64-windows\lib\gdk-3.0.lib C:\vcpkg\installed\x64-windows\lib\gdk-3.lib |
57 | 59 |
|
58 |
| - # cargo away |
59 |
| - - uses: hecrj/setup-rust-action@v1 |
60 |
| - with: |
61 |
| - rust-version: ${{ matrix.rust }} |
62 |
| - - name: Run tests in macros |
63 |
| - run: cd macros; cargo test --all-features |
64 |
| - - name: (Cowindows) Run tests in lib |
65 |
| - if: matrix.os != 'windows-latest' |
66 |
| - run: cd vgtk; cargo test --all-features |
67 |
| - - name: (Windows) Run tests in lib |
68 |
| - if: matrix.os == 'windows-latest' |
69 |
| - env: |
70 |
| - GTK_LIB_DIR: C:\vcpkg\installed\x64-windows\lib |
71 |
| - LIB: C:\vcpkg\installed\x64-windows\lib |
72 |
| - run: cd vgtk; cargo test --all-features |
| 60 | + # cargo away |
| 61 | + - uses: hecrj/setup-rust-action@v1 |
| 62 | + with: |
| 63 | + rust-version: ${{ matrix.rust }} |
| 64 | + - name: (Cowindows) Build tree |
| 65 | + if: matrix.os != 'windows-latest' |
| 66 | + run: cargo build --all-features --verbose --verbose --${{ matrix.release }} |
| 67 | + - name: (Windows) Build tree |
| 68 | + if: matrix.os == 'windows-latest' |
| 69 | + env: |
| 70 | + GTK_LIB_DIR: C:\vcpkg\installed\x64-windows\lib |
| 71 | + LIB: C:\vcpkg\installed\x64-windows\lib |
| 72 | + run: cargo build --all-features --verbose --verbose --${{ matrix.release }} |
| 73 | + - name: Run tests in macros |
| 74 | + run: cd macros; cargo test --all-features --verbose --verbose --${{ matrix.release }} |
| 75 | + - name: (Cowindows) Run tests in lib |
| 76 | + if: matrix.os != 'windows-latest' |
| 77 | + run: cd vgtk; cargo test --all-features --verbose --verbose --${{ matrix.release }} |
| 78 | + - name: (Windows) Run tests in lib |
| 79 | + if: matrix.os == 'windows-latest' |
| 80 | + env: |
| 81 | + GTK_LIB_DIR: C:\vcpkg\installed\x64-windows\lib |
| 82 | + LIB: C:\vcpkg\installed\x64-windows\lib |
| 83 | + run: cd vgtk; cargo test --all-features --verbose --verbose --${{ matrix.release }} |
73 | 84 |
|
74 |
| - clippy: |
75 |
| - runs-on: ubuntu-latest |
76 |
| - steps: |
77 |
| - - name: Install Gtk build environment |
78 |
| - run: | |
79 |
| - sudo apt-get update |
80 |
| - sudo apt-get install -y libgtk-3-dev |
81 |
| - - uses: hecrj/setup-rust-action@v1 |
82 |
| - with: |
83 |
| - rust-version: stable |
84 |
| - components: clippy |
85 |
| - - uses: actions/checkout@v1 |
86 |
| - - name: Clippy |
87 |
| - run: cargo clippy -- -D warnings |
| 85 | + clippy: |
| 86 | + runs-on: ubuntu-latest |
| 87 | + steps: |
| 88 | + - name: Install Gtk build environment |
| 89 | + run: | |
| 90 | + sudo apt-get update |
| 91 | + sudo apt-get install -y libgtk-3-dev |
| 92 | + - uses: hecrj/setup-rust-action@v1 |
| 93 | + with: |
| 94 | + rust-version: stable |
| 95 | + components: clippy |
| 96 | + - uses: actions/checkout@v1 |
| 97 | + - name: Clippy |
| 98 | + run: cargo clippy -- -D warnings |
88 | 99 |
|
89 |
| - rustdoc: |
90 |
| - runs-on: ubuntu-latest |
91 |
| - steps: |
92 |
| - - name: Install Gtk build environment |
93 |
| - run: | |
94 |
| - sudo apt-get update |
95 |
| - sudo apt-get install -y libgtk-3-dev |
96 |
| - - uses: hecrj/setup-rust-action@v1 |
97 |
| - - uses: actions/checkout@master |
98 |
| - - name: Build docs |
99 |
| - run: | |
100 |
| - cargo doc --all-features --package vgtk |
101 |
| - cat > target/doc/index.html <<EOF |
102 |
| - <!doctype html> |
103 |
| - <html><head> |
104 |
| - <meta http-equiv="refresh" content="0; URL='vgtk/'" /> |
105 |
| - </head></html> |
106 |
| - EOF |
107 |
| - - name: Deploy to Github Pages |
108 |
| - uses: crazy-max/ghaction-github-pages@master |
109 |
| - if: success() |
110 |
| - with: |
111 |
| - target_branch: gh-pages |
112 |
| - build_dir: target/doc |
113 |
| - env: |
114 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
115 |
| - GITHUB_PAT: ${{ secrets.ACCESS_TOKEN }} |
| 100 | + rustdoc: |
| 101 | + runs-on: ubuntu-latest |
| 102 | + steps: |
| 103 | + - name: Install Gtk build environment |
| 104 | + run: | |
| 105 | + sudo apt-get update |
| 106 | + sudo apt-get install -y libgtk-3-dev |
| 107 | + - uses: hecrj/setup-rust-action@v1 |
| 108 | + - uses: actions/checkout@master |
| 109 | + - name: Build docs |
| 110 | + run: | |
| 111 | + cargo doc --all-features --package vgtk |
| 112 | + cat > target/doc/index.html <<EOF |
| 113 | + <!doctype html> |
| 114 | + <html><head> |
| 115 | + <meta http-equiv="refresh" content="0; URL='vgtk/'" /> |
| 116 | + </head></html> |
| 117 | + EOF |
| 118 | + - name: Deploy to Github Pages |
| 119 | + uses: crazy-max/ghaction-github-pages@master |
| 120 | + if: success() |
| 121 | + with: |
| 122 | + target_branch: gh-pages |
| 123 | + build_dir: target/doc |
| 124 | + env: |
| 125 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 126 | + GITHUB_PAT: ${{ secrets.ACCESS_TOKEN }} |
0 commit comments