diff --git a/.github/workflows/aarch64_macos_bazel.yml b/.github/workflows/aarch64_macos_bazel.yml new file mode 100644 index 00000000..7fb5c9c6 --- /dev/null +++ b/.github/workflows/aarch64_macos_bazel.yml @@ -0,0 +1,35 @@ +name: AArch64 MacOS Bazel + +on: + push: + pull_request: + schedule: + # min hours day(month) month day(week) + - cron: '0 0 7,22 * *' + +jobs: + # Building using the github runner environement directly. + bazel: + runs-on: macos-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Install Bazel + run: | + brew update + brew unlink bazelisk + brew install bazel + - name: Check Bazel + run: bazel version + - name: Build + run: > + bazel build + -c opt + --subcommands=true + ... + - name: Test + run: > + bazel test + -c opt + --test_output=errors + ... diff --git a/.github/workflows/aarch64_macos_cmake.yml b/.github/workflows/aarch64_macos_cmake.yml new file mode 100644 index 00000000..c4eb03a1 --- /dev/null +++ b/.github/workflows/aarch64_macos_cmake.yml @@ -0,0 +1,43 @@ +name: AArch64 MacOS CMake + +on: + push: + pull_request: + schedule: + # min hours day(month) month day(week) + - cron: '0 0 7,22 * *' + +jobs: + # Building using the github runner environement directly. + xcode: + runs-on: macos-latest + env: + CTEST_OUTPUT_ON_FAILURE: 1 + steps: + - uses: actions/checkout@v2 + - name: Check cmake + run: cmake --version + - name: Configure + run: cmake -S. -Bbuild -G "Xcode" -DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_INSTALL_PREFIX:PATH=destination + - name: Build + run: cmake --build build --config Release --target ALL_BUILD -v + - name: Test + run: cmake --build build --config Release --target RUN_TESTS -v + - name: Install + run: cmake --build build --config Release --target install -v + make: + runs-on: macos-latest + env: + CTEST_OUTPUT_ON_FAILURE: 1 + steps: + - uses: actions/checkout@v2 + - name: Check cmake + run: cmake --version + - name: Configure + run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=destination + - name: Build + run: cmake --build build --target all -v + - name: Test + run: cmake --build build --target test -v + - name: Install + run: cmake --build build --target install -v diff --git a/.github/workflows/amd64_macos_bazel.yml b/.github/workflows/amd64_macos_bazel.yml index fd1bc5a5..8a988699 100644 --- a/.github/workflows/amd64_macos_bazel.yml +++ b/.github/workflows/amd64_macos_bazel.yml @@ -10,7 +10,7 @@ on: jobs: # Building using the github runner environement directly. bazel: - runs-on: macos-latest + runs-on: macos-13 steps: - name: Check out repository code uses: actions/checkout@v3 diff --git a/.github/workflows/amd64_macos_cmake.yml b/.github/workflows/amd64_macos_cmake.yml index 37565004..d1d3d6c5 100644 --- a/.github/workflows/amd64_macos_cmake.yml +++ b/.github/workflows/amd64_macos_cmake.yml @@ -10,7 +10,7 @@ on: jobs: # Building using the github runner environement directly. xcode: - runs-on: macos-latest + runs-on: macos-13 env: CTEST_OUTPUT_ON_FAILURE: 1 steps: @@ -26,7 +26,7 @@ jobs: - name: Install run: cmake --build build --config Release --target install -v make: - runs-on: macos-latest + runs-on: macos-13 env: CTEST_OUTPUT_ON_FAILURE: 1 steps: diff --git a/BUILD.bazel b/BUILD.bazel index 031eb630..f55c47fc 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -322,6 +322,10 @@ cc_library( copts = C99_FLAGS, defines = selects.with_or({ PLATFORM_CPU_X86_64: ["CPU_FEATURES_MOCK_CPUID_X86"], + PLATFORM_CPU_ARM64: [ + "CPU_FEATURES_MOCK_CPUID_AARCH64", + "CPU_FEATURES_MOCK_SYSCTL_AARCH64", + ], "//conditions:default": [], }) + selects.with_or({ PLATFORM_OS_MACOS: ["HAVE_SYSCTLBYNAME"], diff --git a/cmake/ci/docker/amd64/Dockerfile b/cmake/ci/docker/amd64/Dockerfile index 2cc32703..3fba6b84 100644 --- a/cmake/ci/docker/amd64/Dockerfile +++ b/cmake/ci/docker/amd64/Dockerfile @@ -6,7 +6,7 @@ LABEL maintainer="corentinl@google.com" ENV PATH=/usr/local/bin:$PATH RUN apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -yq git wget libssl-dev build-essential \ - ninja-build python3 pkgconf libglib2.0-dev \ + ninja-build python3 python3-venv pkgconf libglib2.0-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ENTRYPOINT ["/usr/bin/bash", "-c"] diff --git a/cmake/ci/docker/toolchain/Dockerfile b/cmake/ci/docker/toolchain/Dockerfile index 1bf25ed3..7970f185 100644 --- a/cmake/ci/docker/toolchain/Dockerfile +++ b/cmake/ci/docker/toolchain/Dockerfile @@ -6,7 +6,7 @@ LABEL maintainer="corentinl@google.com" ENV PATH=/usr/local/bin:$PATH RUN apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -yq git wget libssl-dev build-essential \ - ninja-build python3 pkgconf libglib2.0-dev \ + ninja-build python3 python3-venv pkgconf libglib2.0-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ENTRYPOINT ["/usr/bin/bash", "-c"] diff --git a/scripts/run_integration.sh b/scripts/run_integration.sh index 053ffa96..cc9b94f6 100755 --- a/scripts/run_integration.sh +++ b/scripts/run_integration.sh @@ -33,7 +33,7 @@ function install_qemu() { >&2 echo 'QEMU is disabled !' return 0 fi - local -r QEMU_VERSION=${QEMU_VERSION:=7.1.0} + local -r QEMU_VERSION=${QEMU_VERSION:=9.0.2} local -r QEMU_TARGET=${QEMU_ARCH}-linux-user if echo "${QEMU_VERSION} ${QEMU_TARGET}" | cmp --silent "${QEMU_INSTALL}/.build" -; then @@ -47,7 +47,7 @@ function install_qemu() { rm -rf "${QEMU_INSTALL}" # Checking for a tarball before downloading makes testing easier :-) - local -r QEMU_URL="http://wiki.qemu-project.org/download/qemu-${QEMU_VERSION}.tar.xz" + local -r QEMU_URL="https://download.qemu.org/qemu-${QEMU_VERSION}.tar.xz" local -r QEMU_DIR="qemu-${QEMU_VERSION}" unpack ${QEMU_URL} ${QEMU_DIR} cd ${QEMU_DIR} || exit 2