diff options
| author | Jack | 2023-01-08 04:47:27 +0000 |
|---|---|---|
| committer | Jack | 2023-01-08 04:47:27 +0000 |
| commit | 5aa60ecda6bd2b02dfc7253a47e53c7647981a5c (patch) | |
| tree | 53ea2570c4af7824d6203e0c0cd7953c1ba4910c /.github/workflows | |
| parent | a50a5a287a23ba6b833b13d8cec84dd5dfe0fc61 (diff) | |
| parent | 116210ff806ccdda91b4c3343f78bad66783d0e6 (diff) | |
Merge branch '3.5.x' into 3.5-release
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/install-espresso/action.yml | 25 | ||||
| -rw-r--r-- | .github/workflows/setup-oss-cad-suite/action.yml | 28 | ||||
| -rw-r--r-- | .github/workflows/test.yml | 77 |
3 files changed, 84 insertions, 46 deletions
diff --git a/.github/workflows/install-espresso/action.yml b/.github/workflows/install-espresso/action.yml new file mode 100644 index 00000000..fb1d655a --- /dev/null +++ b/.github/workflows/install-espresso/action.yml @@ -0,0 +1,25 @@ +name: Install Espresso + +inputs: + version: + description: 'version to install' + required: false + default: '2.4' + +runs: + using: composite + steps: + - id: cache-espresso + uses: actions/cache@v3 + with: + path: /usr/local/bin/espresso + key: espresso-${{ runner.os }}-${{ inputs.version }} + + - shell: bash + if: steps.cache-espresso.outputs.cache-hit != 'true' + run: | + cd /tmp + wget -q https://github.com/chipsalliance/espresso/releases/download/v${{ inputs.version }}/x86_64-linux-gnu-espresso + chmod +x x86_64-linux-gnu-espresso + sudo mv x86_64-linux-gnu-espresso /usr/local/bin/espresso + espresso || true diff --git a/.github/workflows/setup-oss-cad-suite/action.yml b/.github/workflows/setup-oss-cad-suite/action.yml new file mode 100644 index 00000000..63d70e92 --- /dev/null +++ b/.github/workflows/setup-oss-cad-suite/action.yml @@ -0,0 +1,28 @@ +name: Setup OSS CAD Suite + +inputs: + version: + description: 'version to install' + required: false + default: '2021-11-09' + +runs: + using: composite + steps: + - id: cache-oss-cad-suite + uses: actions/cache@v3 + with: + path: oss-cad-suite + key: oss-cad-suite-${{ runner.os }}-${{ inputs.version }} + + - shell: bash + if: steps.cache-oss-cad-suite.outputs.cache-hit != 'true' + run: | + VERSION=${{ inputs.version }} + ARTIFACT=oss-cad-suite-linux-x64-$(echo $VERSION | tr -d '-') + wget -q -O - https://github.com/YosysHQ/oss-cad-suite-build/releases/download/${VERSION}/${ARTIFACT}.tgz | tar -zx + + # Add the CAD Suite to the PATH + - shell: bash + run: echo "$(pwd)/oss-cad-suite/bin" >> $GITHUB_PATH + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 69426662..dd129812 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,34 +16,26 @@ jobs: strategy: matrix: system: ["ubuntu-20.04"] - jvm: ["adopt@1.8"] + jvm: ["8"] scala: ["2.13.10", "2.12.17"] espresso: ["2.4"] runs-on: ${{ matrix.system }} steps: - name: Checkout - uses: actions/checkout@v2 - - - name: Install Tabby OSS Cad Suite (from YosysHQ) - uses: YosysHQ/setup-oss-cad-suite@v1 - with: - osscadsuite-version: '2021-11-09' - + uses: actions/checkout@v3 + - name: Install Tabby OSS Cad Suite + uses: ./.github/workflows/setup-oss-cad-suite - name: Install Espresso - run: | - cd /tmp - wget https://github.com/chipsalliance/espresso/releases/download/v${{ matrix.espresso }}/x86_64-linux-gnu-espresso - chmod +x x86_64-linux-gnu-espresso - sudo mv x86_64-linux-gnu-espresso /usr/local/bin/espresso - espresso || true - + uses: ./.github/workflows/install-espresso + with: + version: ${{ matrix.espresso }} - name: Setup Scala - uses: olafurpg/setup-scala@v10 + uses: actions/setup-java@v3 with: + distribution: 'adopt' java-version: ${{ matrix.jvm }} - - name: Cache Scala - uses: coursier/cache-action@v5 + cache: 'sbt' - name: Use Treadle for Pull Requests if: github.event_name == 'pull_request' run: echo "CHISEL3_CI_USE_TREADLE=1" >> $GITHUB_ENV @@ -57,13 +49,13 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Scala - uses: olafurpg/setup-scala@v10 + uses: actions/setup-java@v3 with: - java-version: "adopt@1.11" - - name: Cache Scala - uses: coursier/cache-action@v5 + distribution: 'adopt' + java-version: '11' + cache: 'sbt' - name: Check Formatting run: sbt scalafmtCheckAll - name: Documentation @@ -74,24 +66,17 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v2 - - name: Install Tabby OSS Cad Suite (from YosysHQ) - uses: YosysHQ/setup-oss-cad-suite@v1 - with: - osscadsuite-version: '2021-11-09' + uses: actions/checkout@v3 + - name: Install Tabby OSS Cad Suite + uses: ./.github/workflows/setup-oss-cad-suite - name: Install Espresso - run: | - cd /tmp - wget https://github.com/chipsalliance/espresso/releases/download/v2.4/x86_64-linux-gnu-espresso - chmod +x x86_64-linux-gnu-espresso - sudo mv x86_64-linux-gnu-espresso /usr/local/bin/espresso - espresso || true + uses: ./.github/workflows/install-espresso - name: Setup Scala - uses: olafurpg/setup-scala@v10 + uses: actions/setup-java@v3 with: - java-version: "adopt@1.11" - - name: Cache Scala - uses: coursier/cache-action@v5 + distribution: 'adopt' + java-version: '11' + cache: 'sbt' - name: Integration Tests run: sbt integrationTests/test @@ -108,7 +93,7 @@ jobs: success: ${{ steps.setoutput.outputs.success }} steps: - id: setoutput - run: echo "::set-output name=success::true" + run: echo "success=true" >> $GITHUB_OUTPUT # Related to check-tests above, this job _always_ runs (even if tests fail # and thus check-steps is skipped). This two sentinel job approach avoids an @@ -126,10 +111,10 @@ jobs: - run: | PASSED="${{ needs.check-tests.outputs.success }}" if [[ $PASSED == "true" ]]; then - echo "All tests passed!" + echo "### All tests passed! :rocket:" >> $GITHUB_STEP_SUMMARY exit 0 else - echo "One or more tests FAILED!" + echo "### One or more tests FAILED! :bangbang:" >> $GITHUB_STEP_SUMMARY exit 1 fi @@ -142,13 +127,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Scala - uses: olafurpg/setup-scala@v10 + uses: actions/setup-java@v3 with: - java-version: adopt@1.8 - - name: Cache Scala - uses: coursier/cache-action@v5 + distribution: 'adopt' + java-version: '8' + cache: 'sbt' - name: Setup GPG (for Publish) uses: olafurpg/setup-gpg@v3 - name: Publish |
