Use glow
instead of gl_generator
for GL/GLES bindings
#191
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: ["**"] | |
merge_group: | |
types: [checks_requested] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
Build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-22.04, windows-latest] | |
rust: [stable] | |
features: ["", "--features 'chains sm-raw-window-handle-06'", "--features 'chains sm-raw-window-handle-05'"] | |
target: ["default"] | |
include: | |
# rust stable | |
- os: ubuntu-22.04 | |
features: "--features 'sm-x11 sm-wayland-default'" | |
rust: stable | |
target: "default" | |
- os: ubuntu-22.04 | |
target: "arm-linux-androideabi" | |
rust: stable | |
- os: windows-latest | |
features: "--features 'chains sm-angle-builtin'" | |
rust: stable | |
target: "default" | |
- os: windows-latest | |
features: "--features 'chains sm-no-wgl sm-angle-builtin'" | |
rust: stable | |
target: "default" | |
- os: windows-latest | |
target: "aarch64-pc-windows-msvc" | |
rust: stable | |
- os: ubuntu-22.04 | |
target: "aarch64-unknown-linux-ohos" | |
rust: stable | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies (Linux) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt update | |
sudo apt install gcc libxxf86vm-dev libosmesa6-dev libgles2-mesa-dev -y | |
- name: Install rust | |
id: toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Build target | |
if: matrix.target != 'default' && startsWith(matrix.target, 'aarch64-uwp-windows-msvc') != true | |
run: | | |
rustup +${{steps.toolchain.outputs.name}} target add ${{ matrix.target }} | |
cargo +${{steps.toolchain.outputs.name}} build --verbose ${{ matrix.features }} --target=${{ matrix.target }} | |
- name: Build | |
if: matrix.target == 'default' | |
run: | | |
cargo +${{steps.toolchain.outputs.name}} build --verbose ${{ matrix.features }} | |
- name: Build Windows | |
if: startsWith(matrix.target, 'aarch64-uwp-windows-msvc') | |
shell: cmd | |
run: | | |
rustup +${{steps.toolchain.outputs.name}} component add rust-src --target=aarch64-uwp-windows-msvc | |
cargo +${{steps.toolchain.outputs.name}} build -Z build-std --verbose --target=aarch64-uwp-windows-msvc | |
Format: | |
name: Run `rustfmt` | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: mkroening/rust-toolchain-toml@main | |
- run: cargo fmt --check | |
build_result: | |
name: Result | |
runs-on: ubuntu-latest | |
needs: ["Build", "Format"] | |
if: always() | |
steps: | |
- name: Mark the job as successful | |
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }} | |
run: exit 0 | |
- name: Mark the job as unsuccessful | |
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') | |
run: exit 1 |