Skip to content

Commit 428f578

Browse files
committed
[ci] Speed up by fixing the nix instalation in ubuntu containers
1 parent 67e2ade commit 428f578

File tree

1 file changed

+35
-47
lines changed

1 file changed

+35
-47
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -81,63 +81,51 @@ jobs:
8181
run: |
8282
ctest --test-dir build/sw -R sim_verilator
8383
84-
fpga-build:
85-
runs-on: ["ubuntu-22.04-bitstream"]
86-
needs: verilator-test
87-
outputs:
88-
bitstream-hash: ${{ steps.hash-bitstream.outputs.hash }}
84+
# fpga-build:
85+
# runs-on: ["ubuntu-22.04-bitstream"]
86+
# needs: verilator-test
87+
# outputs:
88+
# bitstream-hash: ${{ steps.hash-bitstream.outputs.hash }}
89+
# steps:
90+
# - uses: actions/checkout@v5
91+
#
92+
# - name: Install Nix
93+
# run: |
94+
# sudo chown -R $(whoami) /nix
95+
#
96+
# - name: Hash Bitstream
97+
# id: hash-bitstream
98+
# run: |
99+
# echo "hash=$(nix run .#bitstream-hash)" >> $GITHUB_OUTPUT
100+
#
101+
# - uses: actions/cache@v5
102+
# id: cache
103+
# with:
104+
# path: build/lowrisc_mocha_chip_mocha_genesys2_0/synth-vivado/lowrisc_mocha_chip_mocha_genesys2_0.bit
105+
# key: ${{ steps.hash-bitstream.outputs.hash }}
106+
# lookup-only: true
107+
#
108+
# - name: Build bitstream
109+
# if: steps.cache.outputs.cache-hit != 'true'
110+
# run: |
111+
# module load xilinx/vivado
112+
# nix run .#bitstream-build
113+
114+
fpga-test:
115+
runs-on: ["self-hosted", "ubuntu-22.04-fpga", "genesys2"]
116+
# needs: fpga-build
89117
steps:
90118
- uses: actions/checkout@v5
91119

92-
# This step is a workaround and should be removed when the container is fixed.
93-
- name: Uninstall Nix
94-
run: |
95-
sudo rm -rf /etc/nix /etc/profile.d/nix.sh /etc/tmpfiles.d/nix-daemon.conf \
96-
/nix ~root/.nix-channels ~root/.nix-defexpr ~root/.nix-profile ~root/.cache/nix
97-
98120
- name: Install Nix
99-
uses: cachix/install-nix-action@v27
100-
with:
101-
extra_nix_config: |
102-
substituters = https://nix-cache.lowrisc.org/public/ https://cache.nixos.org/
103-
trusted-public-keys = nix-cache.lowrisc.org-public-1:O6JLD0yXzaJDPiQW1meVu32JIDViuaPtGDfjlOopU7o= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
121+
run: |
122+
sudo chown -R $(whoami) /nix
104123
105124
- name: Hash Bitstream
106125
id: hash-bitstream
107126
run: |
108127
echo "hash=$(nix run .#bitstream-hash)" >> $GITHUB_OUTPUT
109128
110-
- uses: actions/cache@v5
111-
id: cache
112-
with:
113-
path: build/lowrisc_mocha_chip_mocha_genesys2_0/synth-vivado/lowrisc_mocha_chip_mocha_genesys2_0.bit
114-
key: ${{ steps.hash-bitstream.outputs.hash }}
115-
lookup-only: true
116-
117-
- name: Build bitstream
118-
if: steps.cache.outputs.cache-hit != 'true'
119-
run: |
120-
module load xilinx/vivado
121-
nix run .#bitstream-build
122-
123-
fpga-test:
124-
runs-on: ["self-hosted", "ubuntu-22.04-fpga", "genesys2"]
125-
needs: fpga-build
126-
steps:
127-
- uses: actions/checkout@v5
128-
129-
# This step is a workaround and should be removed when the container is fixed.
130-
- name: Uninstall Nix
131-
run: |
132-
sudo rm -rf /etc/nix /etc/profile.d/nix.sh /etc/tmpfiles.d/nix-daemon.conf \
133-
/nix ~root/.nix-channels ~root/.nix-defexpr ~root/.nix-profile ~root/.cache/nix
134-
135-
- name: Install Nix
136-
uses: cachix/install-nix-action@v27
137-
with:
138-
extra_nix_config: |
139-
substituters = https://nix-cache.lowrisc.org/public/ https://cache.nixos.org/
140-
trusted-public-keys = nix-cache.lowrisc.org-public-1:O6JLD0yXzaJDPiQW1meVu32JIDViuaPtGDfjlOopU7o= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
141129
142130
- uses: actions/cache@v5
143131
with:

0 commit comments

Comments
 (0)