diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 9e2e84b6..116acd29 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -719,3 +719,14 @@ jobs: steps: - uses: actions/checkout@v3 - uses: ./ci + + #64 + openlane-linux: + needs: ["magic-linux", "netgen-linux", "openroad-linux", "yosys-linux-py37", "yosys-linux-py38"] + runs-on: "ubuntu-20.04" + env: + PACKAGE: "misc/openlane" + OS_NAME: "linux" + steps: + - uses: actions/checkout@v3 + - uses: ./ci diff --git a/misc/openlane/1439.patch b/misc/openlane/1439.patch new file mode 100644 index 00000000..470f2bdf --- /dev/null +++ b/misc/openlane/1439.patch @@ -0,0 +1,29 @@ +# From e57dc500ef22047e2d57c1c4bcae83260f6d3672 Mon Sep 17 00:00:00 2001 +From: Johan Euphrosine +Date: Tue, 18 Oct 2022 22:29:37 +0900 +Subject: [PATCH] flow: skip mounted version for local install + +Signed-off-by: Johan Euphrosine +--- + flow.tcl | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/flow.tcl b/flow.tcl +index 2ec16863a..6a9eec912 100755 +--- a/flow.tcl ++++ b/flow.tcl +@@ -386,9 +386,11 @@ if {[catch {exec cat $::env(OPENLANE_ROOT)/install/installed_version} ::env(OPEN + } + } + +-if {![catch {exec git --git-dir $::env(OPENLANE_ROOT)/.git rev-parse HEAD} ::env(OPENLANE_MOUNTED_SCRIPTS_VERSION)]} { +- if { $::env(OPENLANE_VERSION) == $::env(OPENLANE_MOUNTED_SCRIPTS_VERSION)} { +- unset ::env(OPENLANE_MOUNTED_SCRIPTS_VERSION) ++if { ! [info exists ::env(OPENLANE_LOCAL_INSTALL)] || ! $::env(OPENLANE_LOCAL_INSTALL)} { ++ if {![catch {exec git --git-dir $::env(OPENLANE_ROOT)/.git rev-parse HEAD} ::env(OPENLANE_MOUNTED_SCRIPTS_VERSION)]} { ++ if { $::env(OPENLANE_VERSION) == $::env(OPENLANE_MOUNTED_SCRIPTS_VERSION)} { ++ unset ::env(OPENLANE_MOUNTED_SCRIPTS_VERSION) ++ } + } + } + diff --git a/misc/openlane/build.sh b/misc/openlane/build.sh new file mode 100644 index 00000000..0c1dbfae --- /dev/null +++ b/misc/openlane/build.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -ex + +# Identify OS +UNAME_OUT="$(uname -s)" +case "${UNAME_OUT}" in + Linux*) OS=Linux;; + *) OS="${UNAME_OUT}" + echo "Unknown OS: ${OS}" + exit;; +esac + +mkdir -p $PREFIX/share/openlane +git archive HEAD | tar -xv -C $PREFIX/share/openlane +# define system and pdk variables +mkdir -p $PREFIX/share/openlane/install +echo $PKG_VERSION-conda > $PREFIX/share/openlane/install/installed_version +cp -a $RECIPE_DIR/env.tcl $PREFIX/share/openlane/install/ +mkdir -p $PREFIX/share/openlane/install/build/versions +touch $PREFIX/share/openlane/install/build/versions/keep-directory +# override default configuration to disable missing tools +cp -a $RECIPE_DIR/disable-missing-tools.tcl $PREFIX/share/openlane/configuration/disable-missing-tools.tcl +echo -n ' disable-missing-tools.tcl' >> $PREFIX/share/openlane/configuration/load_order.txt +# add flow.tcl shortcut +mkdir -p $PREFIX/bin +cat > $PREFIX/bin/flow.tcl <