-
Notifications
You must be signed in to change notification settings - Fork 0
Basic CI/CD #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic CI/CD #7
Changes from all commits
af68626
5b5a51d
6595ffc
9b0949d
828da36
5238ae4
b1c22c8
848e102
36347bb
1d41633
3e18612
a741b34
4a2a884
4ff80c3
767ce7a
dad1d68
c591876
3ca92ba
22a7e44
fec4637
caf23e0
85b23d0
00c199e
8e8084f
0fd7eae
55e3cbf
cddea9a
d9a3445
3af8e7a
3904bba
7692f8d
222c5a1
3a1f5a9
026d07b
58e86c5
9d2f3ed
96c2ad3
2091117
b1f60b9
be57df6
a63a172
65f2f18
3a407ad
39d0332
a38d1df
e4e32b1
04e080a
5b9ef19
a36cee9
f465122
3259ab0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| name: cache | ||
| descritpion: Set up cache for vcpkg | ||
| inputs: | ||
| triplet: | ||
| description: "The vcpkg triplet to cache" | ||
| required: true | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Cache vcpkg | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: vcpkg-cache | ||
| key: vcpkg-${{ inputs.triplet }}-${{ hashFiles('vcpkg.json') }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| #!/usr/bin/env bash | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
|
|
||
| # | ||
| # The Azure provided machines typically have the following disk allocation: | ||
| # Total space: 85GB | ||
| # Allocated: 67 GB | ||
| # Free: 17 GB | ||
| # This script frees up 28 GB of disk space by deleting unneeded packages and | ||
| # large directories. | ||
| # The Flink end to end tests download and generate more than 17 GB of files, | ||
| # causing unpredictable behavior and build failures. | ||
| # | ||
| echo "==============================================================================" | ||
| echo "Freeing up disk space on CI system" | ||
| echo "==============================================================================" | ||
|
|
||
| echo "Listing 100 largest packages" | ||
| dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 | ||
| df -h | ||
| echo "Removing large packages" | ||
| sudo apt-get remove -y '^ghc-8.*' | ||
| sudo apt-get remove -y '^dotnet-.*' | ||
| sudo apt-get remove -y '^llvm-.*' | ||
| sudo apt-get remove -y 'php.*' | ||
| sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel | ||
| sudo apt-get autoremove -y | ||
| sudo apt-get clean | ||
| df -h | ||
| echo "Removing large directories" | ||
| # deleting 15GB | ||
| rm -rf /usr/share/dotnet/ | ||
| df -h |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,25 @@ | ||||||||||||||
| name: vcpkg | ||||||||||||||
| descritpion: Bootstrap and install dependencies with vcpkg | ||||||||||||||
|
||||||||||||||
| descritpion: Bootstrap and install dependencies with vcpkg | |
| description: Bootstrap and install dependencies with vcpkg |
Copilot
AI
Feb 17, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shell input is marked as required, but the description says it's optional. This is inconsistent. If the shell is truly optional, set 'required: false' and provide a default value. If it's required, remove the "(optional)" text from the description.
| description: "The shell to use for running commands (optional)" | |
| description: "The shell to use for running commands" |
Copilot
AI
Feb 17, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The vcpkg action clones the vcpkg repository but never uses the vcpkg-root argument from the setup.py script. Additionally, the action doesn't actually install any dependencies - it only clones and bootstraps vcpkg. The action should include a step to install dependencies using 'vcpkg install' with the appropriate triplet and manifest mode. Without this step, the dependencies defined in vcpkg.json will not be installed.
| run: python ./.github/vcpkg/setup.py --os ${{ inputs.os }} --triplet ${{ inputs.triplet }} | |
| run: python ./.github/vcpkg/setup.py --os ${{ inputs.os }} --triplet ${{ inputs.triplet }} --vcpkg-root ./vcpkg | |
| - name: Install vcpkg dependencies | |
| shell: ${{ inputs.shell }} | |
| run: ./vcpkg/vcpkg install --triplet ${{ inputs.triplet }} |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,12 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #!/usr/bin/env python3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import argparse | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import subprocess | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import sys | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if __name__ == "__main__": | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| parser = argparse.ArgumentParser(description="Setup vcpkg for the project") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| parser.add_argument("--vcpkg-root", type=str, default="vcpkg", help="Path to the vcpkg directory") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| args = parser.parse_args() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+6
to
+12
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if __name__ == "__main__": | |
| parser = argparse.ArgumentParser(description="Setup vcpkg for the project") | |
| parser.add_argument("--vcpkg-root", type=str, default="vcpkg", help="Path to the vcpkg directory") | |
| args = parser.parse_args() | |
| import os | |
| from pathlib import Path | |
| if __name__ == "__main__": | |
| parser = argparse.ArgumentParser(description="Setup vcpkg for the project") | |
| parser.add_argument( | |
| "--vcpkg-root", | |
| type=str, | |
| default="vcpkg", | |
| help="Path to the vcpkg directory", | |
| ) | |
| parser.add_argument( | |
| "--os", | |
| dest="os", | |
| choices=["windows", "linux", "macos"], | |
| required=True, | |
| help="Target operating system (determines which bootstrap script to run)", | |
| ) | |
| parser.add_argument( | |
| "--triplet", | |
| type=str, | |
| required=True, | |
| help="vcpkg triplet to use when installing dependencies", | |
| ) | |
| args = parser.parse_args() | |
| vcpkg_root = Path(args.vcpkg_root).resolve() | |
| if not vcpkg_root.exists(): | |
| print(f"[vcpkg-setup] vcpkg root directory does not exist: {vcpkg_root}", file=sys.stderr) | |
| sys.exit(1) | |
| if args.os == "windows": | |
| bootstrap_script_name = "bootstrap-vcpkg.bat" | |
| vcpkg_executable_name = "vcpkg.exe" | |
| use_shell = True | |
| else: | |
| bootstrap_script_name = "bootstrap-vcpkg.sh" | |
| vcpkg_executable_name = "vcpkg" | |
| use_shell = False | |
| bootstrap_script = vcpkg_root / bootstrap_script_name | |
| if not bootstrap_script.exists(): | |
| print(f"[vcpkg-setup] Bootstrap script not found: {bootstrap_script}", file=sys.stderr) | |
| sys.exit(1) | |
| print(f"[vcpkg-setup] Bootstrapping vcpkg using {bootstrap_script} ...") | |
| try: | |
| # On Windows, the bootstrap script is a .bat file which typically requires shell=True. | |
| result = subprocess.run( | |
| [str(bootstrap_script)], | |
| cwd=str(vcpkg_root), | |
| shell=use_shell, | |
| check=True, | |
| ) | |
| except subprocess.CalledProcessError as exc: | |
| print(f"[vcpkg-setup] vcpkg bootstrap failed with exit code {exc.returncode}", file=sys.stderr) | |
| sys.exit(exc.returncode) | |
| vcpkg_executable = vcpkg_root / vcpkg_executable_name | |
| if not vcpkg_executable.exists(): | |
| print(f"[vcpkg-setup] vcpkg executable not found after bootstrap: {vcpkg_executable}", file=sys.stderr) | |
| sys.exit(1) | |
| install_cmd = [str(vcpkg_executable), "install", "--triplet", args.triplet] | |
| print(f"[vcpkg-setup] Running: {' '.join(install_cmd)}") | |
| result = subprocess.run(install_cmd, cwd=os.getcwd()) | |
| if result.returncode != 0: | |
| print(f"[vcpkg-setup] vcpkg install failed with exit code {result.returncode}", file=sys.stderr) | |
| sys.exit(result.returncode) | |
| print("[vcpkg-setup] vcpkg setup completed successfully.") |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,61 @@ | ||||||||||||||||||||||||||||||||||||||
| name: Test | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||
| build: | ||||||||||||||||||||||||||||||||||||||
| name: Build (${{ matrix.os }}) | ||||||||||||||||||||||||||||||||||||||
| runs-on: ${{ matrix.os }} | ||||||||||||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||||||||||||
| fail-fast: false | ||||||||||||||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||||||||||||||
| include: | ||||||||||||||||||||||||||||||||||||||
| - os: windows-latest | ||||||||||||||||||||||||||||||||||||||
| triplet: x64-windows | ||||||||||||||||||||||||||||||||||||||
| shell: powershell | ||||||||||||||||||||||||||||||||||||||
| - os: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||
| triplet: x64-linux | ||||||||||||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||
| VCPKG_BINARY_SOURCES: >- | ||||||||||||||||||||||||||||||||||||||
| clear;files,${{ github.workspace }}${{ matrix.os == 'windows-latest' && '\vcpkg-cache' || '/vcpkg-cache' }},readwrite | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Restore vcpkg cache | ||||||||||||||||||||||||||||||||||||||
| uses: ./.github/cache | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
| triplet: ${{ matrix.triplet }} | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Windows vcpkg clone | ||||||||||||||||||||||||||||||||||||||
| if: ${{ matrix.os == 'windows-latest' }} | ||||||||||||||||||||||||||||||||||||||
| run: git clone https://github.com/microsoft/vcpkg D:\a\vcpkg | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Set VCPKG_ROOT on Windows | ||||||||||||||||||||||||||||||||||||||
| if: ${{ matrix.os == 'windows-latest' }} | ||||||||||||||||||||||||||||||||||||||
| run: echo "VCPKG_ROOT=D:\a\vcpkg" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||
| shell: powershell | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Posix vcpkg clone | ||||||||||||||||||||||||||||||||||||||
| if: ${{ matrix.os != 'windows-latest' }} | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| ${{ github.workspace }}/.github/free_disk_space.sh | ||||||||||||||||||||||||||||||||||||||
| git clone https://github.com/microsoft/vcpkg | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Ubuntu Setup | ||||||||||||||||||||||||||||||||||||||
| if: ${{ matrix.os == 'ubuntu-latest' }} | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| sudo apt-get update | ||||||||||||||||||||||||||||||||||||||
| sudo apt-get install -y autoconf autoconf-archive automake libtool libltdl-dev | ||||||||||||||||||||||||||||||||||||||
| sudo apt-get install -y '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libegl1-mesa-dev | ||||||||||||||||||||||||||||||||||||||
| sudo apt-get install -y libsctp-dev libx11-dev libx11-xcb-dev libsm-dev libice-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-render-util0-dev | ||||||||||||||||||||||||||||||||||||||
| sudo apt-get install -y libxcb-render0-dev libxcb-shape0-dev libxcb-shm0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev | ||||||||||||||||||||||||||||||||||||||
| sudo apt-get install -y libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev libdbus-1-dev | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| - name: Bootstrap vcpkg | ||||||||||||||||||||||||||||||||||||||
| run: ${{matrix.os == 'windows-latest' && 'D:\a\vcpkg\bootstrap-vcpkg.bat' || './vcpkg/bootstrap-vcpkg.sh'}} | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
| - name: Install dependencies with vcpkg | |
| shell: ${{ matrix.shell }} | |
| run: | | |
| ./vcpkg/vcpkg install --triplet ${{ matrix.triplet }} | |
| - name: Configure CMake | |
| shell: ${{ matrix.shell }} | |
| run: | | |
| cmake -S . -B build ^ | |
| -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake ^ | |
| -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} | |
| - name: Build | |
| shell: ${{ matrix.shell }} | |
| run: | | |
| cmake --build build --config Release |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,9 @@ | ||
| cmake_minimum_required(VERSION 3.15) | ||
|
|
||
|
|
||
| project(webframe VERSION 0.1.0) | ||
|
|
||
| add_library(webframe_shell STATIC src/shell/shell.cpp) | ||
|
|
||
| add_library(webframe_desktop SHARED) | ||
|
|
||
| add_library(webframe_browser SHARED) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| # Tests for WebFrame | ||
|
|
||
| # Placeholder for tests | ||
| # You can add test executables here using add_executable() and add_test() | ||
|
|
||
| message(STATUS "Test directory - add tests here") | ||
| message(STATUS "Test directory placeholder") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in field name: 'descritpion' should be 'description'.