Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try a new approach to reuse cached builds #67

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,19 @@ jobs:
- uses: actions/checkout@v4
- name: Preflight step to set up the runner
uses: ./.github/actions/setup-node
- run: rustup component add rustfmt
- run: make twoliter check-licenses
- run: make twoliter unit-tests
# Avoid running Go lint check via `cargo make check-lints` since there's a separate golangci-lint workflow
- run: make twoliter check-fmt
# TODO: fixme please!
# - run: make twoliter check-clippy
- run: make twoliter check-shell
- run: make ARCH="${{ matrix.arch }}"
- name: Install Rust nightly
run: rustup toolchain install nightly
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
- name: Build modified packages
env:
MODIFIED_FILES: ${{ steps.changed-files.outputs.modified_files }}
run: |
rm -rf target/
rm -f tools/twoliter/twoliter
BUILDSYS_CICD_HACK=1 make ARCH=${{ matrix.arch }}
for file in ${MODIFIED_FILES} ; do
find "${file}" -print -exec touch {} \;
done
make ARCH=${{ matrix.arch }}
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ prep:
@mkdir -p $(TWOLITER_DIR)
@mkdir -p $(CARGO_HOME)
@$(TOOLS_DIR)/install-twoliter.sh \
--repo "https://github.com/bottlerocket-os/twoliter" \
--version v$(TWOLITER_VERSION) \
--repo "https://github.com/bcressey/twoliter/" \
--version 196f8c8 \
--directory $(TWOLITER_DIR) \
--skip-version-check \
--reuse-existing-install \
--allow-binary-install \
--allow-from-source

update: prep
Expand Down
2 changes: 1 addition & 1 deletion packages/systemd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "systemd"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
publish = false
build = "../build.rs"
Expand Down