Skip to content

Commit

Permalink
[CI] Fetch drm headers
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyMeilex authored and Drakulix committed Mar 27, 2024
1 parent 3dc7514 commit c371ef6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ jobs:
- run: |
sudo apt-get update -y
sudo apt-get install -y libdrm-dev
- name: Fetch drm headers
run: ./.github/workflows/fetch_headers.sh
- name: Update deps
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -105,6 +107,8 @@ jobs:
- run: |
sudo apt-get update -y
sudo apt-get install -y libdrm-dev
- name: Fetch drm headers
run: ./.github/workflows/fetch_headers.sh
- name: Update deps
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -193,12 +197,7 @@ jobs:
echo "CARGO_TARGET_${ENV_TARGET}_LINKER=${GCC_TARGET}-gcc" >> $GITHUB_ENV
echo "BINDGEN_EXTRA_CLANG_ARGS=--sysroot=/usr/${GCC_TARGET}" >> $GITHUB_ENV
- name: Fetch drm headers
run: |
mkdir drm
wget -O drm/drm.h https://github.com/torvalds/linux/raw/master/include/uapi/drm/drm.h
wget -O drm/drm_mode.h https://github.com/torvalds/linux/raw/master/include/uapi/drm/drm_mode.h
echo "LIBDRM_INCLUDE_PATH=${PWD}/drm" >> $GITHUB_ENV
echo "BINDGEN_EXTRA_CLANG_ARGS=-D __user= ${BINDGEN_EXTRA_CLANG_ARGS}" >> $GITHUB_ENV
run: ./.github/workflows/fetch_headers.sh
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/fetch_headers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

mkdir drm
wget -O drm/drm.h https://github.com/torvalds/linux/raw/master/include/uapi/drm/drm.h
wget -O drm/drm_mode.h https://github.com/torvalds/linux/raw/master/include/uapi/drm/drm_mode.h
echo "LIBDRM_INCLUDE_PATH=${PWD}/drm" >> $GITHUB_ENV
echo "BINDGEN_EXTRA_CLANG_ARGS=-D __user= ${BINDGEN_EXTRA_CLANG_ARGS}" >> $GITHUB_ENV

0 comments on commit c371ef6

Please sign in to comment.