diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54809ab..a83851f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: branches: [ main ] jobs: - test: + testStableWebots: strategy: fail-fast: false matrix: @@ -37,6 +37,38 @@ jobs: echo "steps.setupWebots.outputs.cachePath: ${{ steps.setupWebots.outputs.cachePath }}" shell: bash + testNightlyWebots: + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout source + uses: actions/checkout@v3 + + - name: Setup Webots + id: setupWebots + uses: ./ + with: + webotsVersion: R2024a + webotsTag: nightly_26_7_2024 + + - name: Run Webots + run: $RUN_WEBOTS --sysinfo + shell: bash + + - name: Display outputs + run: | + echo "RUN_WEBOTS: $RUN_WEBOTS" + echo "steps.setupWebots.outputs.bashCmd: ${{ steps.setupWebots.outputs.bashCmd }}" + echo "steps.setupWebots.outputs.home: ${{ steps.setupWebots.outputs.home }}" + echo "steps.setupWebots.outputs.binDir: ${{ steps.setupWebots.outputs.binDir }}" + echo "steps.setupWebots.outputs.bin: ${{ steps.setupWebots.outputs.bin }}" + echo "steps.setupWebots.outputs.cachePath: ${{ steps.setupWebots.outputs.cachePath }}" + shell: bash + release: # Only release from the main branch if: github.ref == 'refs/heads/main' diff --git a/action.yml b/action.yml index ecb4bea..f16d79d 100644 --- a/action.yml +++ b/action.yml @@ -4,6 +4,11 @@ inputs: webotsVersion: description: "Version of Webots to install." required: true + webotsTag: + description: "Optionally specify a specific tag from the Webots repository to install. (Defaults to webotsVersion)" + required: false + default: ${{ inputs.webotsVersion }} + outputs: bashCmd: description: "Start of a command line in bash which will run webots on all runners with options suitable for headless execution. This is also put in the RUN_WEBOTS environment variable." @@ -69,11 +74,11 @@ runs: id: cache with: path: ${{ steps.setup.outputs.cachePath }} - key: ${{ runner.os }}-webots-${{ inputs.webotsVersion }} + key: ${{ runner.os }}-webots-${{ inputs.webotsTag }} - name: 'Download Webots' if: steps.cache.outputs.cache-hit != 'true' run: | - curl -L -o "${{ steps.setup.outputs.cachePath }}/${{ steps.setup.outputs.pkgName }}" --create-dirs "https://github.com/cyberbotics/webots/releases/download/${{ inputs.webotsVersion }}/${{ steps.setup.outputs.pkgName }}" + curl -L -o "${{ steps.setup.outputs.cachePath }}/${{ steps.setup.outputs.pkgName }}" --create-dirs "https://github.com/cyberbotics/webots/releases/download/${{ inputs.webotsTag }}/${{ steps.setup.outputs.pkgName }}" if [ '${{ runner.os }}' = 'Windows' ]; then curl -L -o "${{ steps.setup.outputs.cachePath }}/Mesa.7z" --create-dirs https://downloads.fdossena.com/geth.php?r=mesa64-latest fi @@ -83,7 +88,7 @@ runs: if: steps.cache.outputs.cache-hit != 'true' with: path: ${{ steps.setup.outputs.cachePath }} - key: ${{ runner.os }}-webots-${{ inputs.webotsVersion }} + key: ${{ runner.os }}-webots-${{ inputs.webotsTag }} - name: Install Webots run: | cachedWebotsBin="${{ steps.setup.outputs.cachePath }}/${{ steps.setup.outputs.pkgName }}"