-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'ag-github/11-x86' into lineage-18.1
- Loading branch information
Showing
66 changed files
with
2,138 additions
and
857 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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
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 } |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: docs | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
- '!.github/workflows/docs.yml' | ||
pull_request: | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
- '!.github/workflows/docs.yml' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: install prerequisites | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
doxygen \ | ||
libdrm-dev \ | ||
meson | ||
- name: build the docs | ||
run: meson setup _build -D enable_docs=true && meson compile -C _build | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,20 @@ | ||
name: freebsd | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
- '!.github/workflows/freebsd.yml' | ||
pull_request: | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
- '!.github/workflows/freebsd.yml' | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
freebsd: | ||
runs-on: macos-12 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: test | ||
- name: 'Checkout' | ||
uses: actions/checkout@v4 | ||
- name: 'Install prerequisites and build' | ||
uses: vmactions/freebsd-vm@v0 | ||
with: | ||
prepare: | | ||
pkg install -y meson pkgconf libdrm libXext libXfixes wayland | ||
pkg install -y -x '^mesa($|-libs)' | ||
run: | | ||
meson _build | ||
meson setup _build -D werror=true | ||
meson compile -C _build | ||
meson install -C _build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Deploy Docs to GitHub | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: 'Get latest tag' | ||
run: echo "GIT_LATEST_TAG=$(git tag | grep '^[0-9]\+\.[0-9]\+\?\.[0-9]\+\?$' | sort -V -r | head -n1)" >> $GITHUB_ENV | ||
|
||
- name: 'Variables' | ||
run: | | ||
echo $GITHUB_REF_NAME | ||
echo $GIT_LATEST_TAG | ||
- name: 'Install prerequisites' | ||
if: github.ref_name == env.GIT_LATEST_TAG | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
libdrm-dev \ | ||
doxygen \ | ||
meson \ | ||
- name: 'Build the Docs' | ||
if: github.ref_name == env.GIT_LATEST_TAG | ||
run: meson setup _build -D enable_docs=true && meson compile -C _build | ||
|
||
- name: 'Upload the artifacts' | ||
if: github.ref_name == env.GIT_LATEST_TAG | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: "_build/doc/html-out" | ||
|
||
- name: 'Deploy to GitHub Pages' | ||
if: github.ref_name == env.GIT_LATEST_TAG | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
if (( $# != 1 )); then | ||
echo Script requires one argument - the clang version to be installed | ||
exit 1 | ||
fi | ||
|
||
if ! which $CC >/dev/null 2>&1; then | ||
case $DISTRO in | ||
"ubuntu-22.04") distro_name=jammy;; | ||
"ubuntu-20.04") distro_name=focal;; | ||
*) | ||
echo "Unknown distribution $DISTRO" | ||
exit 1 | ||
esac | ||
case $1 in | ||
"14" | "15") llvm_version=$1;; | ||
*) | ||
echo "Unknown llvm version $1" | ||
exit 1 | ||
esac | ||
|
||
sources="deb [trusted=yes] http://apt.llvm.org/$distro_name/ llvm-toolchain-$distro_name-$llvm_version main" | ||
|
||
echo "clang-$llvm_version missed in the image, installing from llvm" | ||
echo "$sources" | sudo tee -a /etc/apt/sources.list | ||
sudo apt-get update | ||
sudo apt-get install -y --no-install-recommends clang-$llvm_version | ||
fi | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
modified_lines=$(git status --short -uno | wc -l) | ||
(( modified_lines == 0 )) && exit 0 | ||
|
||
echo >&2 | ||
echo >&2 "ERROR: Style changes detected" | ||
echo >&2 | ||
|
||
git diff | ||
|
||
echo >&2 | ||
echo >&2 "ERROR: Squash the above changes as needed" | ||
echo >&2 | ||
|
||
exit 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: style | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
style-check: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v4 | ||
- name: 'Install prerequisites' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
astyle | ||
- name: 'Check for style changes' | ||
run: ./style_unify && .github/workflows/style.sh | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,59 @@ | ||
name: ubuntu | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
- '!.github/workflows/ubuntu.yml' | ||
pull_request: | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
- '!.github/workflows/ubuntu.yml' | ||
on: [push, pull_request] | ||
|
||
env: | ||
CFLAGS: -Wall -Werror | ||
|
||
jobs: | ||
clang-15: | ||
runs-on: ubuntu-22.04 | ||
test: | ||
strategy: | ||
matrix: | ||
compiler: [clang-15, gcc] | ||
os: [ubuntu-22.04, ubuntu-20.04] | ||
build: [meson, autotools] | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
CC: /usr/bin/clang-15 | ||
CXX: /usr/bin/clang++-15 | ||
ASM: /usr/bin/clang-15 | ||
CC: ${{ matrix.compiler }} | ||
DISTRO: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install toolchain | ||
run: | | ||
if [[ -e $CC && -e $CXX ]]; then \ | ||
echo "clang-15 already presents in the image"; \ | ||
else \ | ||
echo "clang-15 missed in the image, installing from llvm"; \ | ||
echo "deb [trusted=yes] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" | sudo tee -a /etc/apt/sources.list; \ | ||
sudo apt-get update; \ | ||
sudo apt-get install -y --no-install-recommends clang-15; \ | ||
fi | ||
- name: install prerequisites | ||
- name: 'Checkout' | ||
uses: actions/checkout@v4 | ||
- name: 'Install toolchain' | ||
if: ${{ (matrix.compiler == 'clang-15') }} | ||
run: .github/workflows/install-clang.sh 15 | ||
- name: 'Install prerequisites' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
libdrm-dev \ | ||
libegl1-mesa-dev \ | ||
libgl1-mesa-dev \ | ||
libx11-dev \ | ||
libx11-xcb-dev \ | ||
libxcb-dri3-dev \ | ||
libxext-dev \ | ||
libxfixes-dev \ | ||
libwayland-dev | ||
- name: configure | ||
run: ./autogen.sh --prefix=/usr | ||
- name: build | ||
run: make | ||
- name: check | ||
run: make check | ||
- name: install | ||
run: sudo make install | ||
libwayland-dev \ | ||
meson | ||
- name: 'Print compiler version' | ||
run: ${{ matrix.compiler }} --version | ||
- name: 'Configure (meson)' | ||
if: ${{ (matrix.build == 'meson') }} | ||
run: meson setup ./builddir --prefix=/usr | ||
- name: 'Build (meson)' | ||
if: ${{ (matrix.build == 'meson') }} | ||
run: meson compile -C ./builddir || ninja -C ./builddir | ||
- name: 'Install (meson)' | ||
if: ${{ (matrix.build == 'meson') }} | ||
run: sudo meson install -C ./builddir | ||
|
||
ubuntu-22-04: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install prerequisites | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
libdrm-dev \ | ||
libegl1-mesa-dev \ | ||
libgl1-mesa-dev \ | ||
libx11-dev \ | ||
libxext-dev \ | ||
libxfixes-dev \ | ||
libwayland-dev | ||
- name: configure | ||
- name: 'Configure (autotools)' | ||
if: ${{ (matrix.build == 'autotools') }} | ||
run: ./autogen.sh --prefix=/usr | ||
- name: build | ||
- name: 'Build (autotools)' | ||
if: ${{ (matrix.build == 'autotools') }} | ||
run: make | ||
- name: check | ||
run: make check | ||
- name: install | ||
- name: 'Build and Install (autotools)' | ||
if: ${{ (matrix.build == 'autotools') }} | ||
run: sudo make install | ||
|
||
ubuntu-20-04: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install prerequisites | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
libdrm-dev \ | ||
libegl1-mesa-dev \ | ||
libgl1-mesa-dev \ | ||
libx11-dev \ | ||
libxext-dev \ | ||
libxfixes-dev \ | ||
libwayland-dev | ||
- name: configure | ||
run: ./autogen.sh --prefix=/usr | ||
- name: build | ||
run: make | ||
- name: check | ||
run: make check | ||
- name: install | ||
run: sudo make install | ||
|
Oops, something went wrong.