diff --git a/.github/workflows/prepare-docs.yml b/.github/workflows/prepare-docs.yml index a02febb3b..17d37d08c 100644 --- a/.github/workflows/prepare-docs.yml +++ b/.github/workflows/prepare-docs.yml @@ -26,7 +26,7 @@ jobs: # docs builds are needed for anything on main, any tagged versions, and any tag # or branch starting with docs-preview needs: check_docs_rebuild - if: ${{ needs.check_docs_rebuild.outputs.should_skip != 'true' }} + if: ${{ needs.check_docs_rebuild.outputs.should_skip != 'true' && github.repository == 'YosysHQ/Yosys' }} runs-on: [self-hosted, linux, x64, fast] steps: - name: Checkout Yosys diff --git a/.github/workflows/test-verific.yml b/.github/workflows/test-verific.yml index 9af07b920..c2e4228c4 100644 --- a/.github/workflows/test-verific.yml +++ b/.github/workflows/test-verific.yml @@ -27,7 +27,7 @@ jobs: test-verific: needs: pre-job - if: needs.pre-job.outputs.should_skip != 'true' + if: ${{ needs.pre-job.outputs.should_skip != 'true' && github.repository == 'YosysHQ/Yosys' }} runs-on: [self-hosted, linux, x64, fast] steps: - name: Checkout Yosys diff --git a/.github/workflows/update-flake-lock.yml b/.github/workflows/update-flake-lock.yml index de7ef04d6..b32498baf 100644 --- a/.github/workflows/update-flake-lock.yml +++ b/.github/workflows/update-flake-lock.yml @@ -6,6 +6,7 @@ on: jobs: lockfile: + if: github.repository == 'YosysHQ/Yosys' runs-on: ubuntu-latest steps: - name: Checkout repository diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 26dcba4a4..78d34db46 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -7,6 +7,7 @@ on: jobs: bump-version: + if: github.repository == 'YosysHQ/Yosys' runs-on: ubuntu-latest steps: - name: Checkout @@ -18,11 +19,8 @@ jobs: - name: Take last commit id: log run: echo "message=$(git log --no-merges -1 --oneline)" >> $GITHUB_OUTPUT - - name: Take repository - id: repo - run: echo "message=$GITHUB_REPOSITORY" >> $GITHUB_OUTPUT - name: Bump version - if: "!contains(steps.log.outputs.message, 'Bump version') && contains(steps.repo.outputs.message, 'YosysHQ/yosys')" + if: ${{ !contains(steps.log.outputs.message, 'Bump version') }} run: | make bumpversion git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" @@ -30,7 +28,7 @@ jobs: git add Makefile git commit -m "Bump version" - name: Push changes # push the output folder to your repo - if: "!contains(steps.log.outputs.message, 'Bump version') && contains(steps.repo.outputs.message, 'YosysHQ/yosys')" + if: ${{ !contains(steps.log.outputs.message, 'Bump version') }} uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 21111553d..a112c7ca0 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -48,7 +48,7 @@ int RTLIL::IdString::last_created_idx_[8]; int RTLIL::IdString::last_created_idx_ptr_; #endif -#define X(N) const RTLIL::IdString RTLIL::ID::N(RTLIL::StaticId::N); +#define X(_id) const RTLIL::IdString RTLIL::IDInternal::_id(RTLIL::StaticId::_id); #include "kernel/constids.inc" #undef X diff --git a/kernel/rtlil.h b/kernel/rtlil.h index a12bada08..94a0d9676 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -495,9 +495,14 @@ inline bool RTLIL::IdString::operator!=(const RTLIL::StaticIdString &rhs) const } namespace RTLIL { - namespace ID { + namespace IDInternal { #define X(_id) extern const IdString _id; #include "kernel/constids.inc" +#undef X + } + namespace ID { +#define X(_id) constexpr StaticIdString _id(StaticId::_id, IDInternal::_id); +#include "kernel/constids.inc" #undef X } } @@ -508,7 +513,7 @@ struct IdTableEntry { }; constexpr IdTableEntry IdTable[] = { -#define X(_id) {#_id, RTLIL::StaticIdString(RTLIL::StaticId::_id, RTLIL::ID::_id)}, +#define X(_id) {#_id, ID::_id}, #include "kernel/constids.inc" #undef X };