diff options
author | Alessandro Comodi <acomodi@antmicro.com> | 2021-03-26 12:01:16 +0100 |
---|---|---|
committer | Alessandro Comodi <acomodi@antmicro.com> | 2021-03-26 15:11:03 +0100 |
commit | d0bc033ab80e6c36378de8e22b0e30db79ab3b75 (patch) | |
tree | fcf062ce78d28db2de990ea5d4424d46f4404487 /.github/workflows | |
parent | b5ba3ee9ee5dc7bdae3e528bdfd03b375d8aa34e (diff) | |
download | nextpnr-d0bc033ab80e6c36378de8e22b0e30db79ab3b75.tar.gz nextpnr-d0bc033ab80e6c36378de8e22b0e30db79ab3b75.tar.bz2 nextpnr-d0bc033ab80e6c36378de8e22b0e30db79ab3b75.zip |
gh-actions: better yosys caching based on version
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/interchange_ci.yml | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/.github/workflows/interchange_ci.yml b/.github/workflows/interchange_ci.yml index 6cedef94..4639b261 100644 --- a/.github/workflows/interchange_ci.yml +++ b/.github/workflows/interchange_ci.yml @@ -21,11 +21,22 @@ jobs: - name: ccache uses: hendrikmuhs/ccache-action@v1 - - name: Execute build yosys script + - name: Get yosys + run: git clone https://github.com/YosysHQ/yosys.git + + - name: Cache yosys installation + uses: actions/cache@v2 + id: cache-yosys + with: + path: .yosys + key: cache-yosys-${{ hashFiles('**/yosys/.git/HEAD') }} + + - name: Build yosys run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" source ./.github/ci/build_interchange.sh build_yosys + if: steps.cache-yosys.outputs.cache-hit != 'true' Build-nextpnr: runs-on: ubuntu-latest @@ -45,7 +56,7 @@ jobs: - name: ccache uses: hendrikmuhs/ccache-action@v1 - - name: Execute build interchange script + - name: Execute build nextpnr run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" source ./.github/ci/build_interchange.sh @@ -73,21 +84,39 @@ jobs: - name: ccache uses: hendrikmuhs/ccache-action@v1 + - name: Get yosys + run: git clone https://github.com/YosysHQ/yosys.git + + - name: Cache yosys installation + uses: actions/cache@v2 + id: cache-yosys + with: + path: .yosys + key: cache-yosys-${{ hashFiles('**/yosys/.git/HEAD') }} + + - name: Build yosys + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + source ./.github/ci/build_interchange.sh + build_yosys + if: steps.cache-yosys.outputs.cache-hit != 'true' + - name: Execute build interchange script env: RAPIDWRIGHT_PATH: ${{ github.workspace }}/RapidWright INTERCHANGE_SCHEMA_PATH: ${{ github.workspace }}/3rdparty/fpga-interchange-schema/interchange PYTHON_INTERCHANGE_PATH: ${{ github.workspace }}/python-fpga-interchange PYTHON_INTERCHANGE_TAG: v0.0.4 - run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" source ./.github/ci/build_interchange.sh - build_yosys && build_nextpnr && get_dependencies + build_nextpnr && get_dependencies - name: Run tests env: DEVICE: ${{ matrix.device }} run: | + export PATH="$GITHUB_WORKSPACE/.yosys/usr/local/bin:$PATH" + which yosys cd build make all-$DEVICE-tests -j`nproc` |