From c9f0fe02a189e130f84ed1d6a0dec40a6e49ee6b Mon Sep 17 00:00:00 2001 From: Nicholas Dudfield Date: Fri, 28 Mar 2025 13:27:03 +0700 Subject: [PATCH] [CONAN] Namespace xahau actions/workflows for easier upstream --- .../action.yml | 0 .../{build => xahau-ga-build}/action.yml | 0 .../action.yml | 0 .github/workflows/macos.disabled | 64 ---------- .github/workflows/nix.disabled | 116 ------------------ .github/workflows/windows.disabled | 91 -------------- .../{macos-ga.yml => xahau-ga-macos.yml} | 12 +- .../{nix-ga.yml => xahau-ga-nix.yml} | 12 +- ....disabled => xahau-sh-build-in-docker.yml} | 6 +- 9 files changed, 15 insertions(+), 286 deletions(-) rename .github/actions/{configure-ccache => xahau-configure-ccache}/action.yml (100%) rename .github/actions/{build => xahau-ga-build}/action.yml (100%) rename .github/actions/{dependencies => xahau-ga-dependencies}/action.yml (100%) delete mode 100644 .github/workflows/macos.disabled delete mode 100644 .github/workflows/nix.disabled delete mode 100644 .github/workflows/windows.disabled rename .github/workflows/{macos-ga.yml => xahau-ga-macos.yml} (93%) rename .github/workflows/{nix-ga.yml => xahau-ga-nix.yml} (95%) rename .github/workflows/{build-in-docker.disabled => xahau-sh-build-in-docker.yml} (95%) diff --git a/.github/actions/configure-ccache/action.yml b/.github/actions/xahau-configure-ccache/action.yml similarity index 100% rename from .github/actions/configure-ccache/action.yml rename to .github/actions/xahau-configure-ccache/action.yml diff --git a/.github/actions/build/action.yml b/.github/actions/xahau-ga-build/action.yml similarity index 100% rename from .github/actions/build/action.yml rename to .github/actions/xahau-ga-build/action.yml diff --git a/.github/actions/dependencies/action.yml b/.github/actions/xahau-ga-dependencies/action.yml similarity index 100% rename from .github/actions/dependencies/action.yml rename to .github/actions/xahau-ga-dependencies/action.yml diff --git a/.github/workflows/macos.disabled b/.github/workflows/macos.disabled deleted file mode 100644 index 04d12009b..000000000 --- a/.github/workflows/macos.disabled +++ /dev/null @@ -1,64 +0,0 @@ -name: macos -on: [push, pull_request] - -jobs: - - test: - strategy: - matrix: - platform: - - macos - generator: - - Ninja - configuration: - - Release - runs-on: [self-hosted, macOS, ARM64] - env: - # The `build` action requires these variables. - build_dir: .build - NUM_PROCESSORS: 12 - steps: - - name: checkout - uses: actions/checkout@v4 - - name: install Conan - run: | - brew install conan@1 - echo '/opt/homebrew/opt/conan@1/bin' >> $GITHUB_PATH - - name: install Ninja - if: matrix.generator == 'Ninja' - run: brew install ninja - - name: install python - run: | - if which python > /dev/null 2>&1; then - echo "Python executable exists" - else - brew install python@3.13 - ln -s /opt/homebrew/bin/python3 /opt/homebrew/bin/python - fi - - name: install cmake - run: | - if which cmake > /dev/null 2>&1; then - echo "cmake executable exists" - else - brew install cmake - fi - - name: check environment - run: | - echo ${PATH} | tr ':' '\n' - python --version - conan --version - cmake --version - env - - name: configure Conan - run : | - conan profile new default --detect || true - conan profile update settings.compiler.cppstd=20 default - conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default - - name: build - uses: ./.github/actions/build - with: - generator: ${{ matrix.generator }} - configuration: ${{ matrix.configuration }} - - name: test - run: | - ${build_dir}/rippled --unittest diff --git a/.github/workflows/nix.disabled b/.github/workflows/nix.disabled deleted file mode 100644 index d27dca0ec..000000000 --- a/.github/workflows/nix.disabled +++ /dev/null @@ -1,116 +0,0 @@ -name: nix -on: [push, pull_request] - -jobs: - - dependencies: - strategy: - matrix: - platform: - - linux - compiler: - - gcc - - clang - configuration: - - Debug - - Release - include: - - compiler: gcc - profile: - version: 11 - cc: /usr/bin/gcc - cxx: /usr/bin/g++ - - compiler: clang - profile: - version: 14 - cc: /usr/bin/clang-14 - cxx: /usr/bin/clang++-14 - runs-on: [self-hosted, vanity] - container: rippleci/rippled-build-ubuntu:aaf5e3e - env: - build_dir: .build - steps: - - name: upgrade conan - run: | - pip install --upgrade "conan<2" - - name: check environment - run: | - echo ${PATH} | tr ':' '\n' - conan --version - cmake --version - env - - name: configure Conan - run: | - conan profile new default --detect - conan profile update settings.compiler.cppstd=20 default - conan profile update settings.compiler=${{ matrix.compiler }} default - conan profile update settings.compiler.version=${{ matrix.profile.version }} default - conan profile update settings.compiler.libcxx=libstdc++11 default - conan profile update env.CC=${{ matrix.profile.cc }} default - conan profile update env.CXX=${{ matrix.profile.cxx }} default - conan profile update conf.tools.build:compiler_executables='{"c": "${{ matrix.profile.cc }}", "cpp": "${{ matrix.profile.cxx }}"}' default - - name: checkout - uses: actions/checkout@v3 - - name: dependencies - uses: ./.github/actions/dependencies - with: - configuration: ${{ matrix.configuration }} - - name: archive cache - run: tar -czf conan.tar -C ~/.conan . - - name: upload cache - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }} - path: conan.tar - - - test: - strategy: - fail-fast: false - matrix: - platform: - - linux - compiler: - - gcc - - clang - configuration: - - Debug - - Release - cmake-args: - - - - "-Dunity=ON" - needs: dependencies - runs-on: [self-hosted, vanity] - container: rippleci/rippled-build-ubuntu:aaf5e3e - env: - build_dir: .build - steps: - - name: upgrade conan - run: | - pip install --upgrade "conan<2" - - name: download cache - uses: actions/download-artifact@v4 - with: - name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }} - - name: extract cache - run: | - mkdir -p ~/.conan - tar -xzf conan.tar -C ~/.conan - - name: check environment - run: | - echo ${PATH} | tr ':' '\n' - conan --version - cmake --version - env - ls ~/.conan - - name: checkout - uses: actions/checkout@v3 - - name: build - uses: ./.github/actions/build - with: - generator: Ninja - configuration: ${{ matrix.configuration }} - cmake-args: ${{ matrix.cmake-args }} - - name: test - run: | - ${build_dir}/rippled --unittest --unittest-jobs $(nproc) diff --git a/.github/workflows/windows.disabled b/.github/workflows/windows.disabled deleted file mode 100644 index 3f7acb026..000000000 --- a/.github/workflows/windows.disabled +++ /dev/null @@ -1,91 +0,0 @@ -name: windows -# We have disabled this workflow because it fails in our CI Windows -# environment, but we cannot replicate the failure in our personal Windows -# test environments, nor have we gone through the trouble of setting up an -# interactive CI Windows environment. -# We welcome contributions to diagnose or debug the problems on Windows. Until -# then, we leave this tombstone as a reminder that we have tried (but failed) -# to write a reliable test for Windows. -# on: [push, pull_request] - -jobs: - - test: - strategy: - matrix: - generator: - - Visual Studio 16 2019 - configuration: - - Release - runs-on: windows-2019 - env: - build_dir: .build - steps: - - name: checkout - uses: actions/checkout@v3 - - name: choose Python - uses: actions/setup-python@v3 - with: - python-version: 3.9 - - name: learn Python cache directory - id: pip-cache - run: | - pip install --upgrade pip - echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - - name: restore Python cache directory - uses: actions/cache@v2 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-${{ hashFiles('.github/workflows/windows.yml') }} - - name: install Conan - run: pip install wheel 'conan<2' - - name: check environment - run: | - $env:PATH -split ';' - python --version - conan --version - cmake --version - dir env: - - name: configure Conan - run: | - conan profile new default --detect - conan profile update settings.compiler.cppstd=20 default - conan profile update settings.compiler.runtime=MT default - conan profile update settings.compiler.toolset=v141 default - - name: learn Conan cache directory - id: conan-cache - run: | - echo "dir=$(conan config get storage.path)" >> $GITHUB_OUTPUT - - name: restore Conan cache directory - uses: actions/cache@v2 - with: - path: ${{ steps.conan-cache.outputs.dir }} - key: ${{ hashFiles('~/.conan/profiles/default', 'conanfile.py', 'external/rocksdb/*', '.github/workflows/windows.yml') }} - - name: export custom recipes - run: | - conan export external/snappy snappy/1.1.9@ - conan export external/soci soci/4.0.3@ - - name: install dependencies - run: | - mkdir $env:build_dir - cd $env:build_dir - conan install .. --build missing --settings build_type=${{ matrix.configuration }} - - name: configure - run: | - $env:build_dir - cd $env:build_dir - pwd - ls - cmake ` - -G "${{ matrix.generator }}" ` - -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake ` - -Dassert=ON ` - -Dreporting=OFF ` - -Dunity=OFF ` - .. - - name: build - run: | - cmake --build $env:build_dir --target rippled --config ${{ matrix.configuration }} --parallel $env:NUMBER_OF_PROCESSORS - - name: test - run: | - & "$env:build_dir\${{ matrix.configuration }}\rippled.exe" --unittest diff --git a/.github/workflows/macos-ga.yml b/.github/workflows/xahau-ga-macos.yml similarity index 93% rename from .github/workflows/macos-ga.yml rename to .github/workflows/xahau-ga-macos.yml index 7f89bfcdc..f27409ae3 100644 --- a/.github/workflows/macos-ga.yml +++ b/.github/workflows/xahau-ga-macos.yml @@ -1,12 +1,12 @@ # Original workflow name -name: MacOS Development - GA Runner +name: MacOS - GA Runner on: # Use GA runners on pushes and pull requests targeting feature branches push: - branches: [ jshooks ] # and other feature branches + branches-ignore: ["dev", "candidate", "release"] pull_request: - branches: [ jshooks ] # and other feature branches + branches: [ jshooks ] # Add other feature branches # Concurrency control: Cancels older in-progress runs for the same branch (github.ref) # when a new push occurs. This saves runner minutes on superseded commits. @@ -86,7 +86,7 @@ jobs: # 8. Configure ccache (add this action) - name: Configure ccache - uses: ./.github/actions/configure-ccache + uses: ./.github/actions/xahau-configure-ccache with: max_size: 2G hash_dir: true @@ -113,7 +113,7 @@ jobs: # 11. Install dependencies using the action - name: Install dependencies - uses: ./.github/actions/dependencies + uses: ./.github/actions/xahau-ga-dependencies with: configuration: ${{ matrix.configuration }} build_dir: ${{ env.build_dir }} @@ -123,7 +123,7 @@ jobs: # 12. Build Project using the action - name: Build - uses: ./.github/actions/build + uses: ./.github/actions/xahau-ga-build with: generator: ${{ matrix.generator }} configuration: ${{ matrix.configuration }} diff --git a/.github/workflows/nix-ga.yml b/.github/workflows/xahau-ga-nix.yml similarity index 95% rename from .github/workflows/nix-ga.yml rename to .github/workflows/xahau-ga-nix.yml index 3c4ae9df7..2158d67d4 100644 --- a/.github/workflows/nix-ga.yml +++ b/.github/workflows/xahau-ga-nix.yml @@ -1,12 +1,12 @@ # Original workflow name -name: Nix Development - GA Runner +name: Nix - GA Runner on: # Use GA runners on pushes and pull requests targeting feature branches push: - branches: [jshooks] # and other feature branches + branches-ignore: ["dev", "candidate", "release"] pull_request: - branches: [jshooks] # and other feature branches + branches: [jshooks] # And other feature branches # Concurrency control: Cancels older in-progress runs for the same branch (github.ref) # when a new push occurs. This saves runner minutes on superseded commits. @@ -77,7 +77,7 @@ jobs: # 2.3. Configure ccache - name: Configure ccache - uses: ./.github/actions/configure-ccache + uses: ./.github/actions/xahau-configure-ccache with: max_size: 2G hash_dir: true @@ -119,7 +119,7 @@ jobs: # 2.6. Install Dependencies using the action - name: Install dependencies - uses: ./.github/actions/dependencies + uses: ./.github/actions/xahau-ga-dependencies with: configuration: ${{ matrix.configuration }} build_dir: ${{ env.build_dir }} @@ -129,7 +129,7 @@ jobs: # 2.7. Build Project using the action - name: Build - uses: ./.github/actions/build + uses: ./.github/actions/xahau-ga-build with: generator: Ninja configuration: ${{ matrix.configuration }} diff --git a/.github/workflows/build-in-docker.disabled b/.github/workflows/xahau-sh-build-in-docker.yml similarity index 95% rename from .github/workflows/build-in-docker.disabled rename to .github/workflows/xahau-sh-build-in-docker.yml index 9d959bbc9..cb77cfba5 100644 --- a/.github/workflows/build-in-docker.disabled +++ b/.github/workflows/xahau-sh-build-in-docker.yml @@ -1,10 +1,10 @@ -name: Build using Docker +name: Build using Docker - Self Hosted Runner on: push: - branches: ["dev", "candidate", "release", "jshooks"] + branches: ["dev", "candidate", "release"] pull_request: - branches: ["dev", "candidate", "release", "jshooks"] + branches: ["dev", "candidate", "release"] concurrency: group: ${{ github.workflow }}-${{ github.ref }}