Skip to content

Commit

Permalink
Merge pull request #41 from chriskrycho/render-os-info-cleanup
Browse files Browse the repository at this point in the history
build: once more try using ubuntu-22.04 for libc
  • Loading branch information
chriskrycho authored Feb 11, 2025
2 parents f27395b + b154bf8 commit ab294c1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/CI and CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
jobs:
changes:
name: Identify changes
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
pull-requests: read
steps:
Expand All @@ -33,7 +33,7 @@ jobs:
music: [sites/music/**, sites/_shared]
v6: [sites/v6/**, sites/_shared]
www: [sites/www/**, sites/_shared]
cfg: [render.yaml, _scripts/**]
cfg: [render.yaml, _scripts/**, .github/workflows/**]
outputs:
lx: ${{ steps.filter.outputs.lx }}
Expand All @@ -46,14 +46,14 @@ jobs:
check:
name: Lint and Test
needs: [changes]
if: ${{ needs.changes.outputs.lx == 'true' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.lx == 'true' || needs.changes.outputs.cfg == 'true' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@nextest
- run: cargo fmt --all --quiet -- --check
- run: cargo check --locked
- run: cargo clippy --locked -- --no-deps
- run: cargo nextest run --locked --no-fail-fast

Expand All @@ -67,10 +67,9 @@ jobs:
}}
permissions:
contents: write
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Create release build
run: cargo build --locked --release
Expand Down Expand Up @@ -99,7 +98,7 @@ jobs:
build-check:
name: Check build results
needs: [check, release]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check results
id: check
Expand Down Expand Up @@ -131,7 +130,7 @@ jobs:
)
|| needs.build-check.outputs.state == 'succeeded'
}}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Render deploy hook
Expand All @@ -151,7 +150,7 @@ jobs:
&& needs.build-check.outputs.state == 'non-needed')
|| needs.build-check.outputs.state == 'succeeded'
}}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Render deploy hook
Expand Down
15 changes: 14 additions & 1 deletion _scripts/build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ set -o errexit -o nounset -o pipefail
# Set field separators to newlines and tabs only, for safer word splitting in loops
IFS=$'\n\t'

if [[ $# -eq 0 ]]; then
echo 'usage: build.sh <site name>'
exit 1
fi

if [[ $(uname) == "Linux" ]]; then
cat /proc/version;
else
uname -v;
fi

RELEASES="https://github.com/chriskrycho/v6.chriskrycho.com/releases"
LATEST="${RELEASES}/latest/download/lx-linux"
OUTPUT="lx-cli"
Expand All @@ -24,6 +35,7 @@ download() {
"$url"
}

# Note for jj usage (read: local testing): make sure the repo is colocated!
download_for_pr() {
local sha
sha=$(git rev-parse --short HEAD)
Expand Down Expand Up @@ -51,4 +63,5 @@ chmod +x $OUTPUT
# build the site!
SITE_NAME="$1"
echo "building '$SITE_NAME'"
./lx-cli build "./sites/${SITE_NAME}"
./lx-cli publish "./sites/${SITE_NAME}" || { echo "Build failed with exit code $?"; }
rm ./lx-cli

0 comments on commit ab294c1

Please sign in to comment.