Skip to content

Commit

Permalink
Merge pull request #1 from intel/master
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
kevleyski authored Oct 21, 2024
2 parents 1764831 + 908e201 commit 70197a1
Show file tree
Hide file tree
Showing 126 changed files with 52,033 additions and 44,256 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/EnterDevShell.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
param(
[Parameter()]
[String]$architecture
)

function EnterDevShellEnv {

param(
[Parameter()]
[String]$arch
)

$vsw = Get-Command 'vswhere'
$VSFfavors = 'Community','Professional','Enterprise','BuildTools' | %{ "Microsoft.VisualStudio.Product.$_" }
$vs = & $vsw.Path -products $VSFfavors -latest -format json | ConvertFrom-Json
$tools_dir = Join-Path $vs.installationPath 'Common7' 'Tools'
# Try the root tools dir
$devshell = Join-Path $tools_dir 'Microsoft.VisualStudio.DevShell.dll'
# Try finding it under vsdevshell
if (!(Test-Path $devshell -Type Leaf)) {
$devshell = Join-Path $tools_dir 'vsdevshell' 'Microsoft.VisualStudio.DevShell.dll'
}
# Fail if didn't find the DevShell library
if (!(Test-Path $devshell -Type Leaf)) {
throw "error: cannot find Microsoft.VisualStudio.DevShell.dll"
}
Import-Module $devshell
Enter-VsDevShell -VsInstanceId $vs.instanceId -SkipAutomaticLocation -DevCmdArguments "-arch=$arch -no_logo"
}

# Enter VsDevShell, capture the environment difference and export it to github env
$env_before = @{}
Get-ChildItem env: | %{ $env_before.Add($_.Name, $_.Value) }
EnterDevShellEnv -arch "$architecture"
$env_after = @{}
Get-ChildItem env: | %{ $env_after.Add($_.Name, $_.Value) }
$env_diff = $env_after.GetEnumerator() | where { -not $env_before.ContainsKey($_.Name) -or $env_before[$_.Name] -ne $_.Value }
$env_diff | %{ echo "$($_.Name)=$($_.Value)" >> $env:GITHUB_ENV }
42 changes: 42 additions & 0 deletions .github/workflows/freebsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: freebsd

on:
push:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/freebsd.yml'
pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/freebsd.yml'

permissions: read-all

jobs:
freebsd:
runs-on: ubuntu-latest
steps:
- name: checkout libva
uses: actions/checkout@v4
with:
repository: intel/libva
path: libva
- name: checkout libva-utils
uses: actions/checkout@v4
with:
path: libva-utils
- name: test
uses: vmactions/freebsd-vm@v1
with:
prepare: |
pkg install -y meson pkgconf libdrm libXext libXfixes wayland
pkg install -y -x '^mesa($|-libs)'
run: |
cd libva
meson setup _build --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
meson compile -C _build
meson install -C _build
cd ../libva-utils
meson setup _build --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
meson compile -C _build
meson install -C _build
51 changes: 51 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: ubuntu

on:
push:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/ubuntu.yml'
pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/ubuntu.yml'

permissions: read-all

jobs:
ubuntu-20-04:
runs-on: ubuntu-20.04
steps:
- name: checkout libva
uses: actions/checkout@v3
with:
repository: intel/libva
path: libva
- name: checkout libva-utils
uses: actions/checkout@v3
with:
path: libva-utils
- name: install prerequisites
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libdrm-dev \
libegl1-mesa-dev \
libgl1-mesa-dev \
libx11-dev \
libxext-dev \
libxfixes-dev \
libwayland-dev
- name: build libva
run: |
cd libva
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
make -j$(nproc)
sudo make install
- name: build libva-utils
run: |
cd libva-utils
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
make -j$(nproc)
make check
sudo make install
105 changes: 105 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: windows

on:
push:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/windows.yml'
- '!.github/workflows/EnterDevShell.ps1'
pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/windows.yml'
- '!.github/workflows/EnterDevShell.ps1'

permissions: read-all

jobs:
windows-msvc:
runs-on: windows-2022
steps:
- name: checkout libva
uses: actions/checkout@v3
with:
repository: intel/libva
path: libva
- name: checkout libva-utils
uses: actions/checkout@v3
with:
path: libva-utils
- name: 'Setup Python'
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Meson
run: pip install meson
- name: Install pkg-config
shell: pwsh
run: |
Invoke-RestMethod -Uri https://download.gnome.org/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip -OutFile pkg-config_0.26-1_win32.zip
Expand-Archive pkg-config_0.26-1_win32.zip
Invoke-RestMethod -Uri http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib_2.28.8-1_win32.zip -OutFile glib_2.28.8-1_win32.zip
Expand-Archive glib_2.28.8-1_win32.zip
Invoke-RestMethod -Uri http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip -OutFile gettext-runtime_0.18.1.1-2_win32.zip
Expand-Archive gettext-runtime_0.18.1.1-2_win32.zip
mkdir pkg-config
cp pkg-config_0.26-1_win32\bin\* pkg-config\
cp gettext-runtime_0.18.1.1-2_win32\bin\* pkg-config\
cp glib_2.28.8-1_win32\bin\* pkg-config\
- name: Enter DevShell
run: 'libva-utils\.github\workflows\EnterDevShell.ps1 ${{ inputs.architecture }}'
shell: pwsh
- name: Build libva
run: |
cd libva
meson build
ninja -C build install
- name: Build libva-utils
run: |
$env:Path += ";"
$env:Path += Resolve-Path pkg-config\
$env:Path += ";c:\bin\;c:\lib\"
$env:PKG_CONFIG_PATH = "C:\lib\pkgconfig"
del C:\Strawberry\perl\bin\pkg-config*
cd libva-utils
meson build -Dtests=true
ninja -C build install
windows-mingw:
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
steps:
- name: checkout libva
uses: actions/checkout@v3
with:
repository: intel/libva
path: libva
- name: checkout libva-utils
uses: actions/checkout@v3
with:
path: libva-utils
- name: 'Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: false
install: >-
git
pacboy: >-
toolchain:p
meson:p
- name: Enter DevShell
run: 'libva-utils\.github\workflows\EnterDevShell.ps1 ${{ inputs.architecture }}'
shell: pwsh
- name: Build libva
run: |
cd libva
CC=gcc meson build
CC=gcc ninja -C build install
- name: Build libva-utils
run: |
cd libva-utils
CC=gcc meson build -Dtests=true
CC=gcc ninja -C build install
93 changes: 0 additions & 93 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Once you've finished making your changes push them to your fork and send the PR

## Reporting a security issue

Please mail to [email protected] directly for security issue
Please refer to [security.md](security.md) file for details.

## Public issue tracking

Expand Down
Loading

0 comments on commit 70197a1

Please sign in to comment.