chore(workflows): use rustup directly to not depend on external actions (#258)

This commit is contained in:
Alex Zenla 2024-07-16 19:39:16 -07:00 committed by GitHub
parent 28d63d7d70
commit b26469be28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 41 additions and 33 deletions

View File

@ -17,9 +17,10 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
submodules: recursive submodules: recursive
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable - run: |
with: rustup update --no-self-update stable
components: rustfmt rustup default stable
rustup component add rustfmt
- run: ./hack/ci/install-linux-deps.sh - run: ./hack/ci/install-linux-deps.sh
# Temporarily ignored: https://github.com/edera-dev/krata/issues/206 # Temporarily ignored: https://github.com/edera-dev/krata/issues/206
- run: ./hack/build/cargo.sh fmt --all -- --check || true - run: ./hack/build/cargo.sh fmt --all -- --check || true

View File

@ -35,11 +35,10 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
submodules: recursive submodules: recursive
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable - run: |
if: ${{ matrix.platform.os != 'darwin' }} rustup update --no-self-update stable
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable rustup default stable
with: - run: "rustup target add --toolchain stable ${{ matrix.platform.arch }}-apple-darwin"
targets: "${{ matrix.platform.arch }}-apple-darwin"
if: ${{ matrix.platform.os == 'darwin' }} if: ${{ matrix.platform.os == 'darwin' }}
- uses: homebrew/actions/setup-homebrew@4b34604e75af8f8b23b454f0b5ffb7c5d8ce0056 # master - uses: homebrew/actions/setup-homebrew@4b34604e75af8f8b23b454f0b5ffb7c5d8ce0056 # master
if: ${{ matrix.platform.os == 'darwin' }} if: ${{ matrix.platform.os == 'darwin' }}

View File

@ -24,9 +24,10 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
submodules: recursive submodules: recursive
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable - run: |
with: rustup update --no-self-update stable
targets: "${{ matrix.arch }}-unknown-linux-gnu,${{ matrix.arch }}-unknown-linux-musl" rustup default stable
rustup target add ${{ matrix.arch }}-unknown-linux-gnu ${{ matrix.arch }}-unknown-linux-musl
- run: ./hack/ci/install-linux-deps.sh - run: ./hack/ci/install-linux-deps.sh
- run: ./hack/dist/bundle.sh - run: ./hack/dist/bundle.sh
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
@ -82,11 +83,10 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
submodules: recursive submodules: recursive
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable - run: |
if: ${{ matrix.platform.os != 'darwin' }} rustup update --no-self-update stable
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable rustup default stable
with: - run: "rustup target add --toolchain stable ${{ matrix.platform.arch }}-apple-darwin"
targets: "${{ matrix.platform.arch }}-apple-darwin"
if: ${{ matrix.platform.os == 'darwin' }} if: ${{ matrix.platform.os == 'darwin' }}
- uses: homebrew/actions/setup-homebrew@4b34604e75af8f8b23b454f0b5ffb7c5d8ce0056 # master - uses: homebrew/actions/setup-homebrew@4b34604e75af8f8b23b454f0b5ffb7c5d8ce0056 # master
if: ${{ matrix.platform.os == 'darwin' }} if: ${{ matrix.platform.os == 'darwin' }}

View File

@ -31,9 +31,10 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
submodules: recursive submodules: recursive
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable - run: |
with: rustup update --no-self-update stable
targets: "${{ matrix.arch }}-unknown-linux-gnu,${{ matrix.arch }}-unknown-linux-musl" rustup default stable
rustup target add ${{ matrix.arch }}-unknown-linux-gnu ${{ matrix.arch }}-unknown-linux-musl
- run: ./hack/ci/install-linux-deps.sh - run: ./hack/ci/install-linux-deps.sh
- run: ./hack/dist/bundle.sh - run: ./hack/dist/bundle.sh
- run: "./hack/ci/assemble-release-assets.sh bundle-systemd ${{ github.event.release.tag_name }} ${{ matrix.arch }} target/dist/bundle-systemd-${{ matrix.arch }}.tgz" - run: "./hack/ci/assemble-release-assets.sh bundle-systemd ${{ github.event.release.tag_name }} ${{ matrix.arch }} target/dist/bundle-systemd-${{ matrix.arch }}.tgz"
@ -73,11 +74,10 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
submodules: recursive submodules: recursive
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable - run: |
if: ${{ matrix.platform.os != 'darwin' }} rustup update --no-self-update stable
- uses: dtolnay/rust-toolchain@stable rustup default stable
with: - run: "rustup target add --toolchain stable ${{ matrix.platform.arch }}-apple-darwin"
targets: "${{ matrix.platform.arch }}-apple-darwin"
if: ${{ matrix.platform.os == 'darwin' }} if: ${{ matrix.platform.os == 'darwin' }}
- uses: homebrew/actions/setup-homebrew@4b34604e75af8f8b23b454f0b5ffb7c5d8ce0056 # master - uses: homebrew/actions/setup-homebrew@4b34604e75af8f8b23b454f0b5ffb7c5d8ce0056 # master
if: ${{ matrix.platform.os == 'darwin' }} if: ${{ matrix.platform.os == 'darwin' }}

View File

@ -27,7 +27,9 @@ jobs:
submodules: recursive submodules: recursive
fetch-depth: 0 fetch-depth: 0
token: "${{ steps.generate-token.outputs.token }}" token: "${{ steps.generate-token.outputs.token }}"
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable - run: |
rustup update --no-self-update stable
rustup default stable
- run: ./hack/ci/install-linux-deps.sh - run: ./hack/ci/install-linux-deps.sh
- name: release-plz - name: release-plz
uses: MarcoIeni/release-plz-action@86afd21a7b114234aab55ba0005eed52f77d89e4 # v0.5.62 uses: MarcoIeni/release-plz-action@86afd21a7b114234aab55ba0005eed52f77d89e4 # v0.5.62

View File

@ -25,7 +25,9 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
submodules: recursive submodules: recursive
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable - run: |
rustup update --no-self-update stable
rustup default stable
- run: ./hack/ci/install-linux-deps.sh - run: ./hack/ci/install-linux-deps.sh
- run: ./hack/build/cargo.sh build - run: ./hack/build/cargo.sh build
test: test:
@ -45,7 +47,9 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
submodules: recursive submodules: recursive
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable - run: |
rustup update --no-self-update stable
rustup default stable
- run: ./hack/ci/install-linux-deps.sh - run: ./hack/ci/install-linux-deps.sh
- run: ./hack/build/cargo.sh test - run: ./hack/build/cargo.sh test
clippy: clippy:
@ -65,9 +69,10 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
submodules: recursive submodules: recursive
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable - run: |
with: rustup update --no-self-update stable
components: clippy rustup default stable
rustup component add clippy
- run: ./hack/ci/install-linux-deps.sh - run: ./hack/ci/install-linux-deps.sh
- run: ./hack/build/cargo.sh clippy - run: ./hack/build/cargo.sh clippy
initrd: initrd:
@ -87,8 +92,9 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with: with:
submodules: recursive submodules: recursive
- uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2 # stable - run: |
with: rustup update --no-self-update stable
targets: "${{ matrix.arch }}-unknown-linux-gnu,${{ matrix.arch }}-unknown-linux-musl" rustup default stable
rustup target add ${{ matrix.arch }}-unknown-linux-gnu ${{ matrix.arch }}-unknown-linux-musl
- run: ./hack/ci/install-linux-deps.sh - run: ./hack/ci/install-linux-deps.sh
- run: ./hack/initrd/build.sh - run: ./hack/initrd/build.sh