diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1eba43e..878aad9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -114,29 +114,32 @@ jobs: echo "deps_hash=$(cat .depshash-platformless)" >> $GITHUB_OUTPUT - name: Retrieve cache (base) id: cache-src-base - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | base.tzstd dawn-angle.tzstd thirdparty.tzstd key: src-${{ steps.deps_hash.outputs.deps_hash }}-base + enableCrossOsArchive: true - name: Retrieve cache (linux) if: ${{ runner.os == 'Linux' }} id: cache-src-linux - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | linux.tzstd key: src-${{ steps.deps_hash.outputs.deps_hash }}-linux + enableCrossOsArchive: true - name: Retrieve cache (windows) if: ${{ runner.os == 'Windows' }} id: cache-src-windows - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | windows.tzstd key: src-${{ steps.deps_hash.outputs.deps_hash }}-windows + enableCrossOsArchive: true - name: Extract cache run: | cd "${{ inputs.working_dir }}" diff --git a/.github/workflows/fetch.yml b/.github/workflows/fetch.yml index 9940c7d..27d663e 100644 --- a/.github/workflows/fetch.yml +++ b/.github/workflows/fetch.yml @@ -77,27 +77,33 @@ jobs: echo "deps_hash=$(cat .depshash-platformless)" >> $GITHUB_OUTPUT - name: Retrieve cache (base) id: cache-src-base - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | base.tzstd dawn-angle.tzstd thirdparty.tzstd key: src-${{ steps.deps_hash.outputs.deps_hash }}-base + lookup-only: true + enableCrossOsArchive: true - name: Retrieve cache (linux) id: cache-src-linux - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | linux.tzstd key: src-${{ steps.deps_hash.outputs.deps_hash }}-linux + lookup-only: true + enableCrossOsArchive: true - name: Retrieve cache (windows) id: cache-src-windows - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: | windows.tzstd key: src-${{ steps.deps_hash.outputs.deps_hash }}-windows + lookup-only: true + enableCrossOsArchive: true - name: Check cache id: check_cache run: | @@ -120,6 +126,32 @@ jobs: run: | sudo umount /r || true sudo rm -rf /r || true + - name: Save cache (base) + uses: actions/cache/save@v3 + if: ${{ steps.cache-src-base.outputs.cache-hit != 'true' }} + with: + path: | + base.tzstd + dawn-angle.tzstd + thirdparty.tzstd + key: src-${{ steps.deps_hash.outputs.deps_hash }}-base + enableCrossOsArchive: true + - name: Retrieve cache (linux) + uses: actions/cache/save@v3 + if: ${{ steps.cache-src-linux.outputs.cache-hit != 'true' }} + with: + path: | + linux.tzstd + key: src-${{ steps.deps_hash.outputs.deps_hash }}-linux + enableCrossOsArchive: true + - name: Retrieve cache (windows) + uses: actions/cache/save@v3 + if: ${{ steps.cache-src-windows.outputs.cache-hit != 'true' }} + with: + path: | + windows.tzstd + key: src-${{ steps.deps_hash.outputs.deps_hash }}-windows + enableCrossOsArchive: true - name: The job has succeeded if: ${{ success() }} id: check diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml index e8cc1ad..30a98ff 100644 --- a/.github/workflows/manual-release.yml +++ b/.github/workflows/manual-release.yml @@ -6,29 +6,53 @@ on: version: description: 'Version' required: true - default: 'v20.3.0-rc' + default: '20.3.0-rc' build_macos: description: 'Build macOS' required: false type: boolean + build_windows: + description: 'Build Windows' + required: false + type: boolean jobs: - build_release_mac: - name: Build for Mac ${{ matrix.name }} - if: ${{ github.event.inputs.build_macos }} + build_release: + if: ${{ github.event.inputs.build_windows }} strategy: fail-fast: false matrix: include: - - name: arm64 - runner: macro-arm1 - uses: ./.github/workflows/build_mac.yml + - name: Windows x64 + os: macro-windows + runner: WINDOWS_RUNNER_INSTANCE_ID + working_dir: /r/el + name: Build for ${{ matrix.name }} + uses: ./.github/workflows/build.yml with: + runner_label: ${{ matrix.os }} + working_dir: ${{ matrix.working_dir }} version: ${{ github.event.inputs.version }} - runner_label: ${{ matrix.runner }} + secrets: + EC2_RUNNER_AWS_ID: ${{ secrets.EC2_RUNNER_AWS_ID }} + EC2_RUNNER_AWS_SECRET: ${{ secrets.EC2_RUNNER_AWS_SECRET }} + instance_id: ${{ secrets[matrix.runner] }} + # build_release_mac: + # name: Build for Mac ${{ matrix.name }} + # if: ${{ github.event.inputs.build_macos }} + # strategy: + # fail-fast: false + # matrix: + # include: + # - name: arm64 + # runner: macro-arm1 + # uses: ./.github/workflows/build_mac.yml + # with: + # version: ${{ github.event.inputs.version }} + # runner_label: ${{ matrix.runner }} generate_sha: name: Generate SHA - needs: [build_release_mac] + needs: [build_release] uses: ./.github/workflows/generate-sha.yml with: version: ${{ github.event.inputs.version }}