3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-16 12:15:52 +00:00

ci: cache build instead of using artifacts

This commit is contained in:
Mohamed Gaber 2026-06-30 12:40:16 +03:00
parent f7dc45a478
commit 4a245f9fed
No known key found for this signature in database
2 changed files with 23 additions and 55 deletions

View file

@ -55,11 +55,6 @@ jobs:
python3 -m pip wheel . --wheel-dir /src/dist
'
- uses: actions/upload-artifact@v4
with:
name: linux-musl-wheel
path: dist/*.whl
build-manylinux-wheel:
runs-on: ubuntu-latest
name: Build Linux amd64 wheel (manylinux2014, glibc 2.17+)
@ -121,11 +116,6 @@ jobs:
done
'
- uses: actions/upload-artifact@v4
with:
name: linux-manylinux-wheel
path: dist-manylinux/*.whl
build-macos-wheel:
runs-on: macos-15
name: Build macOS arm64 wheel
@ -162,11 +152,6 @@ jobs:
mkdir -p dist
python3 -m pip wheel . --wheel-dir dist
- uses: actions/upload-artifact@v4
with:
name: macos-wheel
path: dist/*.whl
release:
# allow testing outside main branch
if: github.ref_name == 'main'

View file

@ -90,7 +90,13 @@ jobs:
key: test-build-${{ matrix.os }}
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
restore-keys: |
test-build-${{ matrix.os }}-
test-build-${{ matrix.os }}
- name: Cache Build Directory
uses: actions/cache@v6
with:
path: build
key: ${{ runner.os }}-build-${{ github.run_id }}
- name: Build
shell: bash
@ -104,19 +110,6 @@ jobs:
run: |
./build/yosys-config || true
- name: Compress build
shell: bash
run: |
cd build
tar -cvf ../build.tar share/ yosys yosys-*
- name: Store build artifact
uses: actions/upload-artifact@v7
with:
name: build-${{ matrix.os }}
path: build.tar
retention-days: 1
test-yosys:
name: Run tests
runs-on: ${{ matrix.os }}
@ -142,16 +135,12 @@ jobs:
get-build-deps: true
get-iverilog: true
- name: Download build artifact
uses: actions/download-artifact@v8
- name: Restore Build Directory from Cache
uses: actions/cache@v6
with:
name: build-${{ matrix.os }}
- name: Uncompress build
shell: bash
run: |
mkdir -p build
tar -xvf build.tar -C build
path: build
key: ${{ runner.os }}-build-${{ github.run_id }}
fail-on-cache-miss: true
- name: Log yosys-config output
run: |
@ -192,19 +181,17 @@ jobs:
with:
runs-on: ${{ matrix.os }}
- name: Download build artifact
uses: actions/download-artifact@v8
- name: Restore Build Directory from Cache
uses: actions/cache@v6
with:
name: build-${{ matrix.os }}
- name: Uncompress build
shell: bash
run:
tar -xvf build.tar
path: build
key: ${{ runner.os }}-build-${{ github.run_id }}
fail-on-cache-miss: true
- name: test_cell
shell: bash
run: |
cd build
./yosys -p 'test_cell -n 20 -s 1 all'
./yosys -p 'test_cell -n 20 -s 1 -nosat -aigmap $pow $pmux'
./yosys -p 'test_cell -n 20 -s 1 -nosat -aigmap $eqx $nex $bweqx'
@ -233,16 +220,12 @@ jobs:
get-build-deps: true
get-docs-deps: true
- name: Download build artifact
uses: actions/download-artifact@v8
- name: Restore Build Directory from Cache
uses: actions/cache@v6
with:
name: build-${{ matrix.os }}
- name: Uncompress build
shell: bash
run: |
mkdir -p build
tar -xvf build.tar -C build
path: build
key: ${{ runner.os }}-build-${{ github.run_id }}
fail-on-cache-miss: true
- name: Log yosys-config output
run: |