Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/dtvm_evm_test_x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ on:
permissions:
contents: read

# Shared FetchContent cache root for all container jobs. The hook in
# CMakeLists.txt (commit 96707a2 lines 8-18) picks this up as the base
# dir for FetchContent populations. Each container job adds an
# `actions/cache` step keyed on `hashFiles('third_party/AddDeps.cmake')`
# to persist this dir across CI runs.
env:
FETCHCONTENT_BASE_DIR: /github/home/.fetchcontent

jobs:
build_test_evm_interpreter_x86_ctest:
name: Test DTVM-EVM interpreter with ctest on x86-64
Expand All @@ -27,6 +35,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
Comment thread
abmcar marked this conversation as resolved.
- name: Code Format Check
run: |
./tools/format.sh check
Expand Down Expand Up @@ -61,6 +74,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
- name: Code Format Check
run: |
./tools/format.sh check
Expand Down Expand Up @@ -92,6 +110,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
- name: Code Format Check
run: |
./tools/format.sh check
Expand Down Expand Up @@ -134,6 +157,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
- name: Code Format Check
run: |
./tools/format.sh check
Expand Down Expand Up @@ -165,6 +193,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
- name: Code Format Check
run: |
./tools/format.sh check
Expand Down Expand Up @@ -197,6 +230,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
- name: Code Format Check
run: |
./tools/format.sh check
Expand Down Expand Up @@ -229,6 +267,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
- name: Code Format Check
run: |
./tools/format.sh check
Expand Down Expand Up @@ -259,6 +302,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
- name: Cache Hunter
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -300,6 +348,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
- name: Code Format Check
run: |
./tools/format.sh check
Expand Down Expand Up @@ -342,6 +395,12 @@ jobs:
submodules: "true"
fetch-depth: 0

- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}

- name: Setup git safe directory
run: |
echo "Configuring git safe directory: ${{ github.workspace }}"
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/dtvm_wasm_test_x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ on:
permissions:
contents: read

# Shared FetchContent cache root for all container jobs. The hook in
# CMakeLists.txt (commit 96707a2 lines 8-18) picks this up as the base
# dir for FetchContent populations. Each container job adds an
# `actions/cache` step keyed on `hashFiles('third_party/AddDeps.cmake')`
# to persist this dir across CI runs.
env:
FETCHCONTENT_BASE_DIR: /github/home/.fetchcontent

jobs:
build_test_interp_on_x86:
name: Build and test DTVM interpreter on x86-64
Expand All @@ -27,6 +35,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
- name: Code Format Check
run: |
./tools/format.sh check
Expand Down Expand Up @@ -69,6 +82,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
- name: Code Format Check
run: |
./tools/format.sh check
Expand Down Expand Up @@ -111,6 +129,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
- name: Code Format Check
run: |
./tools/format.sh check
Expand Down Expand Up @@ -153,6 +176,11 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: /github/home/.fetchcontent
key: ${{ runner.os }}-fc-${{ github.workflow }}-v1-${{ hashFiles('third_party/AddDeps.cmake') }}
- name: Code Format Check
run: |
./tools/format.sh check
Expand Down
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ cmake_minimum_required(VERSION 3.16)

project(ZetaEngine LANGUAGES C CXX ASM)

# Honor FETCHCONTENT_BASE_DIR from environment when not set on cmd line. Enables
# a shared FetchContent cache across worktrees, CI jobs, and local builds. CI
# workflows export this env to `/github/home/.fetchcontent` (paired with
# actions/cache); local developers can export `~/.cache/cmake-fetchcontent` per
# `docs/start.md` "Build dependency cache".
if(DEFINED ENV{FETCHCONTENT_BASE_DIR} AND NOT DEFINED
CACHE{FETCHCONTENT_BASE_DIR}
)
set(FETCHCONTENT_BASE_DIR
"$ENV{FETCHCONTENT_BASE_DIR}"
CACHE PATH "Shared FetchContent cache (from env)"
)
endif()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Expand Down
Loading
Loading