Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions-bot committed Dec 17, 2024
0 parents commit e3d65d8
Show file tree
Hide file tree
Showing 646 changed files with 47,290 additions and 0 deletions.
Empty file added .editor/format/.clang-format
Empty file.
Empty file.
13 changes: 13 additions & 0 deletions .editor/format/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Collection of format configs for this project.
As a developer you should not be too concerned about them, they will be picked up by CI.

- [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) for C/C++
- [`biome`](https://biomejs.dev/) for TS/TSX/JSON
- [`xmllint`](https://gitlab.gnome.org/GNOME/libxml2) for XML

Missing (I need to check what vscode is using for them right now maybe):

- Swift
- yml
- toml
- md
Empty file added .editor/format/biome.json
Empty file.
Empty file added .editor/format/meson.format
Empty file.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
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"
103 changes: 103 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Building & Testing
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-build
cancel-in-progress: true

on:
workflow_call:
push:
branches: [master]
paths:
- "**"
- "!**.yml"
- "!docs/**"
- "!docker/**"
- "!**.md"
- "**/build.yml"
pull_request:
branches: [master]
paths:
- "**"
- "!**.yml"
- "!docs/**"
- "!docker/**"
- "!**.md"
- "**/build.yml"

jobs:
format-checks:
uses: ./.github/workflows/format.yml
linux-amd64:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
runs-on: ${{ matrix.os }}
timeout-minutes: 8
env:
CC: clang-19
CXX: clang++-19
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
curl -fsSL https://bun.sh/install | bash
echo "PATH=$HOME/.bun/bin:$PATH" >> $GITHUB_ENV
sudo apt update
sudo apt remove -y firefox
sudo apt upgrade -y
sudo apt install -y \
freeglut3-dev \
libcurl4-openssl-dev \
libpng-dev \
libsqlite3-0 \
python3-pip \
python3-setuptools
python3 -m pip install meson ninja
# for clang
sudo apt install -y wget gpg gnupg software-properties-common
curl -LO https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19 # install clang-19
- name: Configure and build
run: scripts/build-default.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: ubuntu-meson-logs
path: |
build/meson-logs/**/*
macos-arm64:
runs-on: macos-14
timeout-minutes: 8
env:
LDFLAGS: "-L/opt/homebrew/opt/llvm/lib"
CPPFLAGS: "-I/opt/homebrew/opt/llvm/include"
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
curl -fsSL https://bun.sh/install | bash
PATH=$HOME/.bun/bin:$PATH
brew update
brew install \
llvm@19 \
freeglut \
libpng \
meson \
ninja \
fltk
brew install --cask xquartz
cd /opt/homebrew/opt/llvm/bin
#ln -s clang++ clang++-19
PATH=/opt/homebrew/opt/llvm/bin:$PATH
echo "PATH=$PATH" >> $GITHUB_ENV
- name: Configure and build
run: scripts/build-default.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: macos14-meson-logs
path: |
build/meson-logs/**/*
72 changes: 72 additions & 0 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Test Build-Env Docker Image
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-docker-test
cancel-in-progress: true

on:
workflow_dispatch:
pull_request:
branches: master
paths:
- "docker/**"
- "!**.md"
- "**docker-test.yml"

jobs:
build-test-env-image:
runs-on: ubuntu-latest
env:
DOCKER_CACHE_DEST: ${{ github.workspace }}/.docker/buildx-cache
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set variables
run: |
OWNER_LC=${GITHUB_REPOSITORY_OWNER,,}
echo "OWNER_LC=$OWNER_LC" >>${GITHUB_ENV}
echo "IMAGE=ghcr.io/$OWNER_LC/vs-fltk:build-env" >>${GITHUB_ENV}
- name: Check if Dockerfile has changed
run: |
echo "do_build=false" >> $GITHUB_ENV
if [ "${{ github.ref }}" != "refs/heads/master" ]; then
FILES=$(git diff --name-only HEAD~1 HEAD)
if echo "$FILES" | grep -qE "^docker/Dockerfile$"; then
echo "do_build=true" >> $GITHUB_ENV
fi
fi
- name: Cache Docker layers
if: ${{ env.do_build == 'true' }}
id: docker-cache
uses: actions/cache@v4
with:
path: ${{ env.DOCKER_CACHE_DEST }}
key: ${{ runner.os }}-docker-${{ github.ref_name }}
restore-keys: |
${{ runner.os }}-docker-
- name: Set up Docker Buildx
if: ${{ env.do_build == 'true' }}
uses: docker/setup-buildx-action@v3

- name: Build Docker image
if: ${{ env.do_build == 'true' }}
run: |
docker buildx build \
./docker \
-f docker/Dockerfile \
-t $IMAGE \
--cache-to=type=local,dest=${{ env.DOCKER_CACHE_DEST }} \
--cache-from=type=local,src=${{ env.DOCKER_CACHE_DEST }} \
--load
- name: Run commands in Docker container
run: |
export HOSTUID=$(id -u) HOSTGID=$(id -g)
docker compose -f docker/docker-compose.yml run --rm dev
env:
ENTRYPOINT: /entry-build.sh
WORKSPACE: /vs-workspace
49 changes: 49 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build-Env Docker Image
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-docker
cancel-in-progress: true

on:
workflow_dispatch:
push:
branches: master
paths:
- "**Dockerfile"
- "**docker.yml"
schedule:
- cron: "25 1 5 * *"

jobs:
build-env-image:
runs-on: ubuntu-24.04
steps:
- name: Prepare env for workflow
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: "${{ github.repository_owner }}"
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: build
uses: docker/build-push-action@v6
env:
REGISTRY_IMAGE: ghcr.io/${{ env.OWNER_LC }}/vs-fltk
with:
file: ./docker/Dockerfile
context: ./docker
push: true
tags: ${{ env.REGISTRY_IMAGE }}:build-env
cache-from: type=registry,ref=${{ env.REGISTRY_IMAGE }}:build-env-buildcache
cache-to: type=registry,ref=${{ env.REGISTRY_IMAGE }}:build-env-buildcache,mode=max
37 changes: 37 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy Docs

on:
push:
branches:
- master

jobs:
build-deploy:
permissions:
contents: write
pages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Build
run: |
sudo apt install -y \
doxygen \
python3-pip \
python3-setuptools
python3 -m pip install mkdocs mkdocs-github-admonitions-plugin mkdocs-get-deps
mkdir dist
doxygen
mkdocs
bun install -g gh-pages
- name: Deploy
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
gh-pages -d dist -e . -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Format Bot
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-format
cancel-in-progress: true

on:
workflow_call:
jobs:
fake-format-clang:
runs-on: ubuntu-latest
steps:
- run: exit 0
fake-format-meson:
runs-on: ubuntu-latest
steps:
- run: exit 0
#Add here a task for each language to be supported.
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-release
cancel-in-progress: true

on:
workflow_dispatch:
push:
tags:
- "v**"
branches: [master]
jobs:
build-checks:
uses: ./.github/workflows/build.yml
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
release:
needs: [build-checks]
name: release
runs-on: ubuntu-24.04
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
curl -fsSL https://bun.sh/install | bash
echo "PATH=$HOME/.bun/bin:$PATH" >> $GITHUB_ENV
sudo apt update
sudo apt remove -y firefox
sudo apt upgrade -y
sudo apt install -y \
freeglut3-dev \
libcurl4-openssl-dev \
libpng-dev \
libsqlite3-0 \
python3-pip \
python3-setuptools
python3 -m pip install meson ninja
python3 -m pip uninstall cmake
python3 -m pip install cmake==3.30.5 # workaround https://github.com/mesonbuild/meson/issues/13888
# for clang
sudo apt install -y wget gpg gnupg software-properties-common
curl -LO https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19 # install clang-19
- name: Configure and build
run: |
cmake --version
bun install
bun run codegen
bun run meson-setup.clang-release
meson dist -C build/ --allow-dirty --no-tests --include-subprojects
- name: Add artifact
uses: softprops/action-gh-release@v2
with:
files: |
./build/meson-dist/**/*
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.cache
build/
subprojects/*
!subprojects/*.wrap
!subprojects/packagefiles/
*.autogen.*
*.autofrag.*
/dist/
/node_modules/
/bun.lockb
/private/
/logs/
/.flatpak-builder/

# Contains variables specific for the user
/docker/.env
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "flatpak/shared-modules"]
path = flatpak/shared-modules
url = https://github.com/flathub/shared-modules.git
Loading

0 comments on commit e3d65d8

Please sign in to comment.