From 01d27c134e3d57b4e1a36d10b91e2a4a1ddf7182 Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Wed, 2 Oct 2024 12:40:58 -0700 Subject: [PATCH] Replace self-hosted runner with GH-provided runner --- .github/workflows/build-dev-and-ci.yml | 38 ++++++++----------- .github/workflows/build-production.yml | 24 +++++++----- .github/workflows/comment-!build-commands.yml | 23 ++++++----- 3 files changed, 43 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build-dev-and-ci.yml b/.github/workflows/build-dev-and-ci.yml index 0f74fae924..bea00a330c 100644 --- a/.github/workflows/build-dev-and-ci.yml +++ b/.github/workflows/build-dev-and-ci.yml @@ -13,23 +13,16 @@ env: jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest permissions: contents: read deployments: write pull-requests: write - env: - RUSTC_WRAPPER: /usr/bin/sccache - CARGO_INCREMENTAL: 0 - SCCACHE_DIR: /var/lib/github-actions/.cache steps: - name: ๐Ÿ“ฅ Clone and checkout repository uses: actions/checkout@v3 - - name: ๐Ÿ—‘ Clear wasm-bindgen cache - run: rm -r ~/.cache/.wasm-pack || true - - name: ๐ŸŸข Install the latest Node.js uses: actions/setup-node@v4 with: @@ -48,6 +41,17 @@ jobs: echo "Latest updated version:" rustc --version + - name: ๐Ÿ“œ Install Rust dependencies + run: | + cargo install cargo-about + cargo install cargo-watch + cargo install wasm-pack + cargo install -f wasm-bindgen-cli@0.2.92 + + - name: ๐Ÿ“ฆ Install system dependencies + run: | + sudo apt install libgtk-3-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev + - name: โœ‚ Replace template in of index.html run: | # Remove the INDEX_HTML_HEAD_REPLACEMENT environment variable for build links (not master deploys) @@ -59,7 +63,7 @@ jobs: NODE_ENV: production run: | cd frontend - mold -run npm run build + npm run build - name: ๐Ÿ“ค Publish to Cloudflare Pages id: cloudflare @@ -81,25 +85,15 @@ jobs: - name: ๐Ÿ”ฌ Check Rust formatting run: | - mold -run cargo fmt --all -- --check + cargo fmt --all -- --check - name: ๐Ÿฆ€ Build Rust code run: | - mold -run cargo build --all-features + cargo build --all-features - name: ๐Ÿงช Run Rust tests run: | - mold -run cargo test --all-features - - # miri: - # runs-on: self-hosted - - # steps: - # - uses: actions/checkout@v3 - - # - name: ๐Ÿงช Run Rust miri - # run: | - # mold -run cargo +nightly miri nextest run -j32 --all-features + cargo test --all-features cargo-deny: runs-on: ubuntu-latest diff --git a/.github/workflows/build-production.yml b/.github/workflows/build-production.yml index fa58e1865b..24855f2691 100644 --- a/.github/workflows/build-production.yml +++ b/.github/workflows/build-production.yml @@ -7,26 +7,19 @@ on: env: CARGO_TERM_COLOR: always + INDEX_HTML_HEAD_REPLACEMENT: jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest permissions: contents: write deployments: write - env: - RUSTC_WRAPPER: /usr/bin/sccache - CARGO_INCREMENTAL: 0 - SCCACHE_DIR: /var/lib/github-actions/.cache - INDEX_HTML_HEAD_REPLACEMENT: steps: - name: ๐Ÿ“ฅ Clone and checkout repository uses: actions/checkout@v3 - - name: ๐Ÿ—‘ Clear wasm-bindgen cache - run: rm -r ~/.cache/.wasm-pack - - name: ๐ŸŸข Install the latest Node.js uses: actions/setup-node@v4 with: @@ -45,6 +38,17 @@ jobs: echo "Latest updated version:" rustc --version + - name: ๐Ÿ“œ Install Rust dependencies + run: | + cargo install cargo-about + cargo install cargo-watch + cargo install wasm-pack + cargo install -f wasm-bindgen-cli@0.2.92 + + - name: ๐Ÿ“ฆ Install system dependencies + run: | + sudo apt install libgtk-3-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev + - name: โœ‚ Replace template in of index.html run: | sed -i "s||$INDEX_HTML_HEAD_REPLACEMENT|" frontend/index.html @@ -54,7 +58,7 @@ jobs: NODE_ENV: production run: | cd frontend - mold -run npm run build + npm run build - name: ๐Ÿ“ค Publish to Cloudflare Pages id: cloudflare diff --git a/.github/workflows/comment-!build-commands.yml b/.github/workflows/comment-!build-commands.yml index a8fa55e275..d7fbe3bd53 100644 --- a/.github/workflows/comment-!build-commands.yml +++ b/.github/workflows/comment-!build-commands.yml @@ -22,15 +22,11 @@ jobs: github.event.issue.pull_request && github.event.comment.author_association == 'MEMBER' && (github.event.comment.body == '!build-dev' || github.event.comment.body == '!build-profiling' || github.event.comment.body == '!build') - runs-on: self-hosted + runs-on: ubuntu-latest permissions: contents: read deployments: write pull-requests: write - env: - RUSTC_WRAPPER: /usr/bin/sccache - CARGO_INCREMENTAL: 0 - SCCACHE_DIR: /var/lib/github-actions/.cache steps: - name: ๐Ÿ”Ž Find branch for this PR @@ -50,10 +46,6 @@ jobs: repository: ${{ steps.commit_info.outputs.repo }} ref: ${{ steps.commit_info.outputs.ref }} - - name: ๐Ÿ—‘ Clear wasm-bindgen cache - continue-on-error: true - run: rm -r ~/.cache/.wasm-pack - - name: ๐ŸŸข Install the latest Node.js uses: actions/setup-node@v4 with: @@ -72,6 +64,17 @@ jobs: echo "Latest updated version:" rustc --version + - name: ๐Ÿ“œ Install Rust dependencies + run: | + cargo install cargo-about + cargo install cargo-watch + cargo install wasm-pack + cargo install -f wasm-bindgen-cli@0.2.92 + + - name: ๐Ÿ“ฆ Install system dependencies + run: | + sudo apt install libgtk-3-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev + - name: โœ‚ Replace template in of index.html run: | # Remove the INDEX_HTML_HEAD_REPLACEMENT environment variable for build links (not master deploys) @@ -96,7 +99,7 @@ jobs: NODE_ENV: production run: | cd frontend - mold -run npm run ${{ steps.build_command.outputs.command }} + npm run ${{ steps.build_command.outputs.command }} - name: ๐Ÿ“ค Publish to Cloudflare Pages id: cloudflare