-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Temporary cancel build step while I figure out some stuff. * Empty container? * Confirm JS actions are disallowed. * They are disallowed. * Run single step in container. * Was it really running IN the container? * Run script. * need to get the path right. * Basic cargo builds with a target and setup. * Setup cargo target. * Check if we're on Linux correctly. * Fix toolchain * Is jemalloc the culprit? * Do I need build-essential? * Forget target for now, try build. * cache key calculation * Syntax fix. * Correct cache key conditional * Use build.sh for everything. * Fix conditional * Make cache-key computable * set -x and address some shellcheck issues. * Update vendor_download.sh to download arm assets. * Guard script arguments. Remove some old commentary. * My guards worked too well... * Run git config update just before build. * Change release verification to include arm * Only unit-tests. * Spec fix for building with arm. * aarch target. * hail mary rust build * One more target. * Does installing musl-dev work? * use sudo? * Try moving rust build into script. * More scripts. * syntax error. * Try with cc arg * revert me * Corrections. * env vars * Revert "Try with cc arg" This reverts commit 7c92287. * Try cross. * Revert "Try cross." This reverts commit fb866a8. * try using build-arm.sh * Non-interactive rustup. * Enable the environment. * Switch to lib-snippets. Configure link flags for Cargo. * path fix I hope * Propagate project files correctly. * conditionalize extra-source-files. * Print some env info. * Always save the cabal cache. * Commentary. * Fix cargo test. more debug output * temporarily disable cabal install check. * Help embeddedbinaries be findable when cabal is not running in root dir. * Temporarily disable diagnose. * Bring back cabal install check. * Revert "Bring back cabal install check." This reverts commit c56b7ce. * Cache key perms. * Permissions. * Try cleaning up. * Print home where cabal stuff goes. * echo paths * store-dir * Revert "store-dir" This reverts commit 2379f28. * Logic for LinuxARM cabal store. * MOre cabal store junk * Dummy cache test. * Try adding an additional rust-cache directory. * Re-enable other matrix builds. * Restore integration tests. * Update create release. * Try putting the cabal install check back. * Remove extra ls * Revert "Try putting the cabal install check back." This reverts commit 1e34a3b. * Bring back non linux arm cargo tests and diagnose checks. * Install nextest. * Don't need extra tooling on linux arm * Fix condition. * Cabal install check condition. * Cache OS. * Sha256 sum everything. * A little cleanup. * Fix quoting. * Insert arm generated bundles. * Add support for linux/arm64 to install-latest.sh * Only shasum fossa binaries. * Fix arch_version check so it doesn't trigger on macos. * Attempt to re-enable jemalloc on linux x86_64. * Remove dead code. * Revert conditional extra-source-files. * Final cleanup. * Update changelog. * jemalloc linux arm? * Better integrate jemalloc on arm. * Fix duplicated tests. * Use /runner/. $HOME is not set correctly. * Fix script oops.
- Loading branch information
Showing
13 changed files
with
263 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[target.aarch64-unknown-linux-musl] | ||
rustflags = ["-C", "link-arg=-lgcc"] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
set -x | ||
|
||
if [ $# -lt 2 ] ; then | ||
echo "Usage: ./build-arm.sh <RUNNER OS> <PROJECT FILE> [FEATURES]" | ||
exit 1 | ||
fi | ||
|
||
RUNNER_OS=$1 | ||
PROJECT_FILE=$2 | ||
FEATURES=$3 | ||
|
||
# Install rust tooling | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal | ||
. "/home/runner/.cargo/env" | ||
|
||
rustc -V | ||
cargo -V | ||
|
||
# Build Rust binaries | ||
cargo build ${FEATURES:+--features $FEATURES} --release | ||
|
||
cargo test --release | ||
|
||
# Validate that diagnose runs | ||
cargo run --release --bin diagnose -- walk --trace-spans none --trace-level info | ||
|
||
# Now do Haskell things | ||
./.github/workflows/scripts/build.sh "$RUNNER_OS" "$PROJECT_FILE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
set -x | ||
|
||
if [ $# -lt 2 ] ; then | ||
echo "Usage: ./build.sh <RUNNER OS> <PROJECT FILE>" | ||
exit 1 | ||
fi | ||
|
||
RUNNER_OS=$1 | ||
PROJECT_FILE=$2 | ||
|
||
make build-test-data | ||
|
||
# Does this need to run in the container? | ||
# It normally runs outside. | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
|
||
# With dist-newstyle caches: | ||
# Cabal mainly knows to recompile based on changes to files. | ||
# Tagging in git doesn't reliably change a file in a fixed location that cabal/GHC can track to indicate that there's a new tag. | ||
# For our release process, we merge to master, which builds (and may store a dist-newstyle cache), then push a release tag. | ||
# During the tag build, cabal/GHC may not realize that they have to rebuild the Version.hs file because the tag is invisible to it. | ||
# This line adds a comment to our version source file to prompt cabal/GHC to rebuild Version.hs. | ||
echo "{- $GITHUB_RUN_ID -}" >> src/App/Version.hs | ||
cabal update | ||
cabal build --project-file="$PROJECT_FILE" all | ||
cabal test --project-file="$PROJECT_FILE" unit-tests | ||
|
||
# Todo: Bring this back. | ||
# Test cabal-install. | ||
# This check ensures that QuickImport can use spectrometer as a library. | ||
# if [ "$RUNNER_OS" = 'Linux' ] ; then | ||
# cabal install --overwrite-policy=always --project-file="$PROJECT_FILE" --ghc-options="-Wwarn" | ||
# fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
set -x | ||
|
||
if [ $# -lt 2 ] ; then | ||
echo "Usage: ./compute_cache_key <RUNNER OS> <PROJECT FILE>" | ||
exit 1 | ||
fi | ||
|
||
RUNNER_OS=$1 | ||
PROJECT_FILE=$2 | ||
|
||
cabal --project-file="$PROJECT_FILE" update | ||
cabal --project-file="$PROJECT_FILE" build --dry-run | ||
jq '."install-plan"[]."id"' < dist-newstyle/cache/plan.json | sort > /tmp/cabal-cache-key | ||
echo "Install plan:" | ||
cat /tmp/cabal-cache-key | ||
|
||
if [ "$RUNNER_OS" = "macOS" ]; then | ||
PLAN_SUM=$(shasum -a256 /tmp/cabal-cache-key) | ||
else | ||
PLAN_SUM=$(sha256sum /tmp/cabal-cache-key) | ||
fi | ||
|
||
CABAL_CACHE_KEY="$(echo "$PLAN_SUM" | awk '{print $1}')" | ||
export CABAL_CACHE_KEY | ||
echo "Cabal cache key: $CABAL_CACHE_KEY" | ||
echo "cabal-cache-key=$CABAL_CACHE_KEY" >> "$GITHUB_OUTPUT" | ||
|
||
echo "Home dotfiles in container: $(ls -al ~/.*)" | ||
|
||
# Cleanup. Restoring this cache seems to fail if the directory already exists. | ||
rm -rf dist-newstyle |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters