From b4c372df78dfb77bdaf4a3000ca6e0ffa8331492 Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Wed, 11 Dec 2024 21:10:36 -0800 Subject: [PATCH 1/2] Add CI for Runtime Test --- .github/workflows/runtime.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/runtime.yml diff --git a/.github/workflows/runtime.yml b/.github/workflows/runtime.yml new file mode 100644 index 0000000..a0c9103 --- /dev/null +++ b/.github/workflows/runtime.yml @@ -0,0 +1,40 @@ +# Runtime tests + +name: Runtime + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +jobs: + test: + name: Runtime + runs-on: ubuntu-24.04 + + strategy: + matrix: + python-version: ["3.12"] + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + update-environment: true + - name: Display Python version + run: python -c "import sys; print(sys.version)" + + - name: Install CMake + run: sudo apt-get install -y cmake + - name: Start virtual environment + run: python -m venv _e + - name: Install Dependencies + run: source _e/bin/activate && pip install -e . + + - name: Test + run: source _e/bin/activate && cmake . && ctest -VV . From 0104dcc41296d3228f5813050678ff9ed32ccb65 Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Wed, 11 Dec 2024 21:56:52 -0800 Subject: [PATCH 2/2] Use container to run tests --- .github/workflows/runtime.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/runtime.yml b/.github/workflows/runtime.yml index a0c9103..067c58a 100644 --- a/.github/workflows/runtime.yml +++ b/.github/workflows/runtime.yml @@ -11,30 +11,20 @@ on: jobs: test: name: Runtime - runs-on: ubuntu-24.04 - - strategy: - matrix: - python-version: ["3.12"] + runs-on: ubuntu-latest + container: python:3.13-bookworm steps: - uses: actions/checkout@v4 with: submodules: recursive - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - update-environment: true - name: Display Python version run: python -c "import sys; print(sys.version)" - name: Install CMake - run: sudo apt-get install -y cmake - - name: Start virtual environment - run: python -m venv _e + run: apt-get update && apt-get install -y cmake - name: Install Dependencies - run: source _e/bin/activate && pip install -e . + run: pip install -e . - name: Test - run: source _e/bin/activate && cmake . && ctest -VV . + run: cmake . && ctest -VV .