Skip to content

Commit 6096a1b

Browse files
committedApr 27, 2023
cargo update, re-run build.py, restructure examples + CI
1 parent d54e1d9 commit 6096a1b

29 files changed

+3983
-3871
lines changed
 

‎.github/workflows/rust.yml

+74-50
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,81 @@
1-
name: Rust
1+
name: Build
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
tags:
8+
# this is _not_ a regex, see: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
9+
- '[0-9]+.[0-9]+.[0-9]+*'
10+
pull_request:
11+
workflow_dispatch:
12+
inputs:
13+
release:
14+
description: 'Make release'
415

516
jobs:
6-
build-linux:
7-
runs-on: ubuntu-latest
8-
9-
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v1
12-
13-
- name: Install latest rust toolchain
14-
uses: actions-rs/toolchain@v1
15-
with:
16-
toolchain: stable
17-
default: true
18-
override: true
19-
20-
- name: Check (Linux)
21-
run: cd azul-dll && cargo check --verbose --release
22-
23-
build-win:
24-
runs-on: windows-latest
25-
17+
setup:
18+
name: Set up
19+
runs-on: ubuntu-22.04
20+
outputs:
21+
VERSION: ${{ steps.setup.outputs.VERSION }}
22+
DOING_RELEASE: ${{ steps.setup.outputs.DOING_RELEASE }}
2623
steps:
27-
- name: Checkout
28-
uses: actions/checkout@v1
29-
30-
- name: Install latest rust toolchain
31-
uses: actions-rs/toolchain@v1
32-
with:
33-
toolchain: stable
34-
default: true
35-
override: true
36-
37-
- name: Check (Windows)
38-
run: cd azul-dll && cargo check --verbose --release
39-
40-
build-mac:
41-
runs-on: macos-latest
24+
- name: Set up env vars
25+
id: setup
26+
shell: bash
27+
run: |
28+
VERSION=${GITHUB_REF/refs\/tags\//}
29+
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
30+
DOING_RELEASE=$(echo $VERSION | grep -c '^[0-9]\+\.[0-9]\+\.[0-9]\+\(-\([a-zA-Z]\+\)\?[0-9]*\)\?$' || true)
31+
echo "DOING_RELEASE=${DOING_RELEASE}" >> $GITHUB_OUTPUT
32+
echo $VERSION
33+
echo $DOING_RELEASE
4234
35+
build:
36+
name: Build on ${{ matrix.build }}
37+
runs-on: ${{ matrix.os }}
38+
needs: setup
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
include:
43+
- build: macos-x64
44+
os: macos-11
45+
- build: windows-x64
46+
os: windows-2019
47+
- build: linux-x64
48+
os: ubuntu-22.04
4349
steps:
44-
- name: Checkout
45-
uses: actions/checkout@v1
46-
47-
- name: Install latest rust toolchain
48-
uses: actions-rs/toolchain@v1
50+
- uses: actions/checkout@v3
51+
- name: Install Rust
52+
uses: dtolnay/rust-toolchain@stable
4953
with:
50-
toolchain: stable
51-
target: x86_64-apple-darwin
52-
default: true
53-
override: true
54-
55-
- name: Check (Mac)
56-
run: cd azul-dll && cargo check --verbose --release
57-
54+
toolchain: 1.69
55+
- name: Check that build.py is up to date
56+
run: |
57+
python3 ./build.py
58+
something_changed=`git diff-index --exit-code --ignore-submodules HEAD`
59+
if [ -n "$something_changed" ]
60+
then
61+
echo >&2 "build.py has changes, please re-run build.py and commit changes"
62+
exit 1
63+
fi
64+
- name: Check azul-css
65+
run: cargo check --verbose --manifest-path azul-css/Cargo.toml
66+
- name: Check azul-core
67+
run: cargo check --verbose --manifest-path azul-core/Cargo.toml
68+
- name: Check azul-css-parser
69+
run: cargo check --verbose --manifest-path azul-css-parser/Cargo.toml
70+
- name: Check azul-text-layout
71+
run: cargo check --verbose --manifest-path azul-text-layout/Cargo.toml
72+
- name: Check azul-layout
73+
run: cargo check --verbose --manifest-path azul-layout/Cargo.toml
74+
- name: Check azulc
75+
run: cargo check --verbose --manifest-path azulc/Cargo.toml
76+
- name: Check azul-desktop
77+
run: cargo check --verbose --manifest-path azul-desktop/Cargo.toml
78+
- name: Check azul-dll
79+
run: cargo check --verbose --manifest-path azul-dll/Cargo.toml
80+
- name: Check examples
81+
run: cargo check --verbose --examples --all-features

0 commit comments

Comments
 (0)
Please sign in to comment.