Skip to content

Commit

Permalink
Merge pull request #22 from yasuhito/ci/add-cache-to-setup-staq
Browse files Browse the repository at this point in the history
ci: add caching for setup-staq action
  • Loading branch information
snuffkin authored Dec 25, 2024
2 parents 95d14c1 + 553c70d commit da6d883
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/actions/setup-staq/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ description: Install Staq quantum compiler
runs:
using: composite
steps:
- name: Cache apt packages
id: cache-apt
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: ${{ runner.os }}-apt-${{ hashFiles('.github/actions/setup-staq/action.yml') }}

- name: Install dependencies
if: steps.cache-apt.outputs.cache-hit != 'true'
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
build-essential \
Expand All @@ -15,7 +23,15 @@ runs:
libboost-all-dev
shell: bash

- name: Cache Staq build
id: cache-staq
uses: actions/cache@v4
with:
path: /usr/local/bin/staq
key: ${{ runner.os }}-staq-${{ hashFiles('.github/actions/setup-staq/action.yml') }}

- name: Build and install Staq
if: steps.cache-staq.outputs.cache-hit != 'true'
run: |
cd /tmp
git clone https://github.com/softwareQinc/staq.git
Expand Down

0 comments on commit da6d883

Please sign in to comment.