Skip to content

almost basic img support #195

almost basic img support

almost basic img support #195

Workflow file for this run

on: [push]
name: self
jobs:
bin:
runs-on: ubuntu-latest
steps:
- run: docker buildx version
- run: DOCKER_BUILDKIT=1 docker --help
- run: docker buildx bake --help
- run: docker buildx build --help
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: actions/checkout@v4
# Actually, the whole archives
- name: Cache `cargo fetch`
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-deps-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-deps-
- name: Cache `cargo install`
uses: actions/cache@v4
with:
path: ~/instmp
key: ${{ runner.os }}-cargo-install-${{ hashFiles('**/Cargo.lock') }}-and-${{ hashFiles('src/**') }}
restore-keys: |
${{ runner.os }}-cargo-install-${{ hashFiles('**/Cargo.lock') }}-and-
${{ runner.os }}-cargo-install-
- name: Compile HEAD cargo-green
run: |
CARGO_TARGET_DIR=~/instmp cargo install --locked --force --path=./cargo-green
- name: Compile HEAD rustcbuildx
run: |
CARGO_TARGET_DIR=~/instmp cargo install --locked --force --path=./rustcbuildx
- run: ls -lha ~/instmp/release/
- run: ls -lha /home/runner/.cargo/bin/
- uses: actions/upload-artifact@v4
with:
name: bin-artifacts
path: |
/home/runner/.cargo/bin/cargo-green
/home/runner/.cargo/bin/rustcbuildx
installs:
runs-on: ubuntu-latest
needs: bin
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Retrieve saved bin
uses: actions/download-artifact@v4
with:
name: bin-artifacts
- run: | # TODO: whence https://github.com/actions/download-artifact/issues/236
chmod +x ./cargo-green ./rustcbuildx
./rustcbuildx --version | grep rustcbuildx
mv ./rustcbuildx /home/runner/.cargo/bin/
mv ./cargo-green /home/runner/.cargo/bin/
cargo green --version
- uses: actions/checkout@v4
- name: cargo install net=ON cache=OFF remote=OFF jobs=$(nproc)
run: |
RUSTCBUILDX_LOG=debug \
CARGO_TARGET_DIR=~/instst cargo green -vv install --jobs=$(nproc) --locked --force --path=./rustcbuildx
audits:
runs-on: ubuntu-latest
needs: bin
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Retrieve saved bin
uses: actions/download-artifact@v4
with:
name: bin-artifacts
- run: | # TODO: whence https://github.com/actions/download-artifact/issues/236
chmod +x ./cargo-green ./rustcbuildx
./rustcbuildx --version | grep rustcbuildx
mv ./rustcbuildx /home/runner/.cargo/bin/
mv ./cargo-green /home/runner/.cargo/bin/
cargo green --version
- uses: actions/checkout@v4
# Actually, the whole archives
- name: Cache `cargo fetch`
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-deps-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-deps-
- name: Cache `cargo install`
uses: actions/cache@v4
with:
path: ~/cargo-audit
key: ${{ runner.os }}-cargo-install-audit
- name: Compile cargo-audit
run: |
CARGO_TARGET_DIR=~/cargo-audit cargo install --locked --force cargo-audit --features=fix
- name: cargo audit net=ON cache=OFF remote=OFF
run: |
RUSTCBUILDX_LOG=debug \
RUSTCBUILDX_LOG_PATH="$PWD"/logs.txt \
cargo green -vv audit || \
cat logs.txt
udeps:
runs-on: ubuntu-latest
needs: bin
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- name: Retrieve saved bin
uses: actions/download-artifact@v4
with:
name: bin-artifacts
- run: | # TODO: whence https://github.com/actions/download-artifact/issues/236
chmod +x ./cargo-green ./rustcbuildx
./rustcbuildx --version | grep rustcbuildx
mv ./rustcbuildx /home/runner/.cargo/bin/
mv ./cargo-green /home/runner/.cargo/bin/
cargo green --version
- uses: actions/checkout@v4
# Actually, the whole archives
- name: Cache `cargo fetch`
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-deps-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-deps-
- name: Cache `cargo install`
uses: actions/cache@v4
with:
path: ~/cargo-udeps
key: ${{ runner.os }}-cargo-install-udeps
- name: Compile cargo-udeps
run: |
CARGO_TARGET_DIR=~/cargo-udeps cargo install --locked --force cargo-udeps
- name: cargo green +nightly udeps --all-targets net=ON cache=OFF remote=OFF
run: |
RUSTCBUILDX_LOG=debug \
RUSTCBUILDX_LOG_PATH="$PWD"/logs.txt \
cargo green +nightly udeps --all-targets || \
cat logs.txt
builds:
runs-on: ubuntu-latest
needs: bin
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Retrieve saved bin
uses: actions/download-artifact@v4
with:
name: bin-artifacts
- run: | # TODO: whence https://github.com/actions/download-artifact/issues/236
chmod +x ./cargo-green ./rustcbuildx
./rustcbuildx --version | grep rustcbuildx
mv ./rustcbuildx /home/runner/.cargo/bin/
mv ./cargo-green /home/runner/.cargo/bin/
cargo green --version
- uses: actions/checkout@v4
- name: Cache `cargo fetch`
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-deps-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-deps-
- run: cargo fetch
- name: cargo build net=OFF cache=OFF remote=OFF jobs=$(nproc)
run: |
RUSTCBUILDX_LOG=debug \
RUSTCBUILDX_LOG_PATH="$PWD"/logs.txt \
cargo green -vv build --jobs=$(nproc) --all-targets --all-features --locked --frozen --offline
- if: ${{ failure() || success() }}
run: cat logs.txt && echo >logs.txt
- if: ${{ failure() || success() }}
name: Ensure running the same command twice without modifications does not recompile anything
run: |
RUSTCBUILDX_LOG=debug \
RUSTCBUILDX_LOG_PATH="$PWD"/logs.txt \
cargo green -vv build --jobs=1 --all-targets --all-features --locked --frozen --offline 2>&1 | tee _
cat _ | grep Finished | grep 0...s
cat _ | grep Fresh
! cat _ | grep Compiling
! cat _ | grep 'DEBUG|INFO|WARN|ERROR'
- if: ${{ failure() || success() }}
run: cat logs.txt && echo >logs.txt
tests:
runs-on: ubuntu-latest
needs: bin
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Retrieve saved bin
uses: actions/download-artifact@v4
with:
name: bin-artifacts
- run: | # TODO: whence https://github.com/actions/download-artifact/issues/236
chmod +x ./cargo-green ./rustcbuildx
./rustcbuildx --version | grep rustcbuildx
mv ./rustcbuildx /home/runner/.cargo/bin/
mv ./cargo-green /home/runner/.cargo/bin/
cargo green --version
- uses: actions/checkout@v4
- name: Cache `cargo fetch`
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-deps-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-deps-
- run: cargo fetch
- name: cargo test net=OFF cache=OFF remote=OFF jobs=$(nproc)
run: |
RUSTCBUILDX_LOG=debug \
RUSTCBUILDX_LOG_PATH="$PWD"/logs.txt \
cargo green -vv test --jobs=$(nproc) --all-targets --all-features --locked --frozen --offline
- if: ${{ failure() || success() }}
run: cat logs.txt && echo >logs.txt
- if: ${{ failure() || success() }}
name: Ensure running the same command twice without modifications does not recompile anything
run: |
RUSTCBUILDX_LOG=debug \
RUSTCBUILDX_LOG_PATH="$PWD"/logs.txt \
cargo green -vv test --jobs=1 --all-targets --all-features --locked --frozen --offline 2>&1 | tee _
cat _ | grep Finished | grep 0...s
cat _ | grep Fresh
! cat _ | grep Compiling
! cat _ | grep 'DEBUG|INFO|WARN|ERROR'
- if: ${{ failure() || success() }}
run: cat logs.txt && echo >logs.txt
checks:
runs-on: ubuntu-latest
needs: bin
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Retrieve saved bin
uses: actions/download-artifact@v4
with:
name: bin-artifacts
- run: | # TODO: whence https://github.com/actions/download-artifact/issues/236
chmod +x ./cargo-green ./rustcbuildx
./rustcbuildx --version | grep rustcbuildx
mv ./rustcbuildx /home/runner/.cargo/bin/
mv ./cargo-green /home/runner/.cargo/bin/
cargo green --version
- uses: actions/checkout@v4
- name: Cache `cargo fetch`
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-deps-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-deps-
- run: cargo fetch
- name: cargo check net=OFF cache=OFF remote=OFF jobs=$(nproc)
run: |
RUSTCBUILDX_LOG=debug \
RUSTCBUILDX_LOG_PATH="$PWD"/logs.txt \
cargo green -vv check --jobs=$(nproc) --all-targets --all-features --locked --frozen --offline
- if: ${{ failure() || success() }}
run: cat logs.txt && echo >logs.txt
- if: ${{ failure() || success() }}
name: Ensure running the same command twice without modifications does not recompile anything
run: |
RUSTCBUILDX_LOG=debug \
RUSTCBUILDX_LOG_PATH="$PWD"/logs.txt \
cargo green -vv check --jobs=1 --all-targets --all-features --locked --frozen --offline 2>&1 | tee _
cat _ | grep Finished | grep 0...s
cat _ | grep Fresh
! cat _ | grep Compiling
! cat _ | grep 'DEBUG|INFO|WARN|ERROR'
- if: ${{ failure() || success() }}
run: cat logs.txt && echo >logs.txt
clippy:
runs-on: ubuntu-latest
needs: bin
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- run: rustup component add clippy
- name: Retrieve saved bin
uses: actions/download-artifact@v4
with:
name: bin-artifacts
- run: | # TODO: whence https://github.com/actions/download-artifact/issues/236
chmod +x ./cargo-green ./rustcbuildx
./rustcbuildx --version | grep rustcbuildx
mv ./rustcbuildx /home/runner/.cargo/bin/
mv ./cargo-green /home/runner/.cargo/bin/
cargo green --version
- uses: actions/checkout@v4
- name: Cache `cargo fetch`
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-deps-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-deps-
- run: cargo fetch
- name: cargo clippy net=OFF cache=OFF remote=OFF jobs=$(nproc)
run: |
RUSTCBUILDX_LOG=debug \
RUSTCBUILDX_LOG_PATH="$PWD"/logs.txt \
cargo green -vv clippy --jobs=$(nproc) --all-targets --all-features --locked --frozen --offline
- if: ${{ failure() || success() }}
run: cat logs.txt && echo >logs.txt
- if: ${{ failure() || success() }}
name: Ensure running the same command twice without modifications does not recompile anything
run: |
RUSTCBUILDX_LOG=debug \
RUSTCBUILDX_LOG_PATH="$PWD"/logs.txt \
cargo green -vv clippy --jobs=1 --all-targets --all-features --locked --frozen --offline 2>&1 | tee _
cat _ | grep Finished | grep 0...s
! cat _ | grep 'Compiling|Compiling'
! cat _ | grep 'DEBUG|INFO|WARN|ERROR'
- if: ${{ failure() || success() }}
run: cat logs.txt && echo >logs.txt