diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 7000bf6816b..00000000000 --- a/.cirrus.yml +++ /dev/null @@ -1,31 +0,0 @@ -#------------------------------------------------------------------------------------------------------- -# Copyright (c) ChakraCore Project Contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. -#------------------------------------------------------------------------------------------------------- - -task: - name: CMake ARM64.macOS.Debug (noJit) - macos_instance: - image: ghcr.io/cirruslabs/macos-ventura-xcode - Dependencies_script: brew install ninja icu4c && mkdir -p build - CMake_script: cd build && cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DSTATIC_LIBRARY=ON -DICU_INCLUDE_PATH=/opt/homebrew/opt/icu4c/include -DDISABLE_JIT=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang .. - Build_script: cd build && ninja - Test_script: cd build && ninja check - -task: - name: CMake ARM64.macOS.ReleaseWithDebug (noJit) - macos_instance: - image: ghcr.io/cirruslabs/macos-ventura-xcode - Dependencies_script: brew install ninja icu4c && mkdir -p build - CMake_script: cd build && cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DICU_INCLUDE_PATH=/opt/homebrew/opt/icu4c/include -DDISABLE_JIT=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang .. - Build_script: cd build && ninja - Test_script: cd build && ninja check - -task: - name: CMake ARM64.macOS.Release (noJit) - macos_instance: - image: ghcr.io/cirruslabs/macos-ventura-xcode - Dependencies_script: brew install ninja icu4c && mkdir -p build - CMake_script: cd build && cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DSTATIC_LIBRARY=ON -DICU_INCLUDE_PATH=/opt/homebrew/opt/icu4c/include -DDISABLE_JIT=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang .. - Build_script: cd build && ninja - Test_script: cd build && ninja check diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000000..6379b7760eb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,99 @@ +name: "CI" +on: + push: + branches: [ "master" ] + pull_request: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" # At 00:00 on Monday + +jobs: + cmake: + name: ${{ matrix.artifact_name }} + runs-on: ${{ matrix.image_name }} + + strategy: + fail-fast: false + matrix: + include: + # region Linux Arm64 + - artifact_name: linux-arm64-debug-nojit + image_name: ubuntu-24.04-arm + build_type: Debug + static_library: false + disable_jit: true + + - artifact_name: linux-arm64-test-nojit + image_name: ubuntu-24.04-arm + build_type: RelWithDebInfo + static_library: false + disable_jit: true + + - artifact_name: linux-arm64-release-nojit + image_name: ubuntu-24.04-arm + build_type: Release + static_library: false + disable_jit: true + # endregion + + # region MacOS Arm64 + - artifact_name: macos-arm64-debug-nojit + image_name: macos-14 + build_type: Debug + static_library: true + disable_jit: true + + - artifact_name: macos-arm64-test-nojit + image_name: macos-14 + build_type: RelWithDebInfo + static_library: false + disable_jit: true + + - artifact_name: macos-arm64-release-nojit + image_name: macos-14 + build_type: Release + static_library: true + disable_jit: true + # endregion + + steps: + - name: Check out repository + uses: actions/checkout@v7 + + - name: Install Linux Dependencies + if: runner.os == 'Linux' + run: sudo apt-get install -y ninja-build clang libicu-dev + + - name: Install macOS Dependencies + if: runner.os == 'macOS' + run: brew install ninja icu4c + + - name: Create build directories + run: mkdir -p build + + - name: CMake + working-directory: build + run: | + cmake -GNinja \ + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + ${{ case(matrix.static_library, '-DSTATIC_LIBRARY=ON', '') }} \ + ${{ case(matrix.disable_jit, '-DDISABLE_JIT=ON', '') }} \ + ${{ case(runner.os == 'macOS', '-DICU_INCLUDE_PATH=/opt/homebrew/opt/icu4c/include', '') }} \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_C_COMPILER=clang \ + .. + + - name: Build + working-directory: build + run: ninja + + - name: Upload build artifact + uses: actions/upload-artifact@v7 + with: + name: ${{ matrix.artifact_name }} + path: build/bin/ + if-no-files-found: error + + - name: Test + working-directory: build + run: ninja check