diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 029661e..8eba0cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,19 +59,35 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 - run: python tools/overwrite_dev_versions_with_date.py - - run: mkdir -p output/stim - - run: mkdir -p output/stimcirq - - run: mkdir -p output/sinter - run: python -m pip install pybind11~=2.11.1 cibuildwheel~=2.16.2 setuptools - run: python -m cibuildwheel --print-build-identifiers - run: python -m cibuildwheel --output-dir output/chromobius + - uses: actions/upload-artifact@v4.4.0 + with: + name: "dist-chromobius-${{ matrix.os_dist.os }}-${{ matrix.os_dist.dist }}-${{ matrix.os_dist.macosarch }}" + path: dist/* + build_sdist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - run: python -m pip install setuptools pybind11~=2.11.1 + - run: python tools/overwrite_dev_versions_with_date.py + - run: mkdir output - run: python setup.py sdist - - run: mv dist/* output/chromobius - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4.4.0 with: - name: dist - path: | - ./output/chromobius/* + name: "dist-chromobius-sdist" + path: dist/*.tar.gz + merge_upload_artifacts: + needs: ["build_dist", "build_sdist"] + runs-on: ubuntu-latest + steps: + - name: Merge Artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: dist-chromobius + pattern: dist-chromobius-* check_sdist_installs: runs-on: ubuntu-latest steps: @@ -90,14 +106,19 @@ jobs: build_bazel: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: bazelbuild/setup-bazelisk@v1 + - uses: actions/checkout@v3 + - uses: bazel-contrib/setup-bazel@0.8.5 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }} + repository-cache: true + bazelisk-version: 1.x - run: bazel build :all - run: bazel test :chromobius_test build_clang: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - run: | cd .. git clone https://github.com/google/googletest.git -b release-1.12.1 @@ -115,14 +136,14 @@ jobs: perf: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - run: cmake . - run: make chromobius_perf -j 2 - run: out/chromobius_perf test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - run: | cd .. git clone https://github.com/google/googletest.git -b release-1.12.1 @@ -136,7 +157,7 @@ jobs: test_o3: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - run: | cd .. git clone https://github.com/google/googletest.git -b release-1.12.1 @@ -152,7 +173,12 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 - - uses: bazelbuild/setup-bazelisk@v1 + - uses: bazel-contrib/setup-bazel@0.8.5 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }} + repository-cache: true + bazelisk-version: 1.x - run: bazel build :chromobius_dev_wheel - run: pip install bazel-bin/chromobius-0.0.dev0-py3-none-any.whl - run: diff <(python tools/gen_chromobius_api_reference.py -dev) doc/chromobius_api_reference.md @@ -172,7 +198,12 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 - - uses: bazelbuild/setup-bazelisk@v1 + - uses: bazel-contrib/setup-bazel@0.8.5 + with: + bazelisk-cache: true + disk-cache: ${{ github.workflow }} + repository-cache: true + bazelisk-version: 1.x - run: bazel build :chromobius_dev_wheel - run: pip install bazel-bin/chromobius-0.0.dev0-py3-none-any.whl - run: pip install pytest stim sinter pygltflib