-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '2d09a9f6f22831005c9bce3f8eb39e22beddd167' into support-…
…old-rust
- Loading branch information
Showing
245 changed files
with
7,950 additions
and
4,200 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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
FROM mcr.microsoft.com/devcontainers/rust:0.203.8-1-bullseye | ||
# Some of this is shared with /Dockerfile | ||
|
||
FROM mcr.microsoft.com/devcontainers/rust:0.203.11-1-bullseye | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
cmake \ | ||
cmake \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin | ||
|
||
# ========= Install cargo-tools for non-root user (vscode) ========= | ||
COPY Taskfile.cargo-tools.yml /tmp/Taskfile.cargo-tools.yml | ||
WORKDIR /tmp | ||
COPY Taskfile.yml /tmp/Taskfile.yml | ||
USER vscode | ||
RUN task -t Taskfile.cargo-tools.yml install | ||
|
||
RUN task -t /tmp/Taskfile.yml install-cargo-tools-binstall | ||
|
||
USER root |
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
File renamed without changes.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: build-devcontainer | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- .devcontainer/** | ||
- .github/workflows/build-devcontainer.yaml | ||
- Taskfile.yml | ||
push: | ||
# We could push this on the stable branch (currently named `web`) if we | ||
# needed a clearer release schedule. | ||
# We don't run on every merge to main because: | ||
# - I'm not sure whether starting a new devcontainer pulls a new image every | ||
# time, which would be annoying when there are no changes (maybe it's the | ||
# same but relies on the cache working perfertly) | ||
# - The arm64 build is very very slow, takes 2-3 hours, so we don't want to | ||
# run it excessively. | ||
# | ||
# If the cache works reliably, we can remove this path restriction and run on every merge. | ||
branches: | ||
- main | ||
paths: | ||
- .devcontainer/** | ||
- .github/workflows/build-devcontainer.yaml | ||
- Taskfile.yml | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3600 | ||
steps: | ||
- uses: docker/metadata-action@v4 | ||
id: meta | ||
with: | ||
images: ghcr.io/${{ github.repository_owner }}/prql-devcontainer-base | ||
# We could use explicit tags (but mostly we just want the most recent version). | ||
tags: | | ||
type=raw,latest | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build | ||
uses: docker/build-push-action@v4 | ||
timeout-minutes: 3600 | ||
with: | ||
file: .devcontainer/base-image/Dockerfile | ||
tags: ${{ steps.meta.outputs.tags }} | ||
platforms: linux/amd64,linux/arm64 | ||
push: | ||
${{ github.ref == 'refs/heads/main' || startsWith(github.ref, | ||
'refs/tags/') }} | ||
cache-from: | | ||
ghcr.io/${{ github.repository_owner }}/prql-devcontainer-base | ||
type=gha | ||
cache-to: | | ||
type=inline | ||
${{ github.ref_name == 'main' && 'type=gha,mode=max' || '' }} |
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,83 @@ | ||
name: build-web | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "web/**" | ||
- ".github/workflows/build-web.yaml" | ||
- "**.md" | ||
workflow_call: | ||
|
||
concurrency: | ||
# See notes in `pull-request.yaml` | ||
group: ${{ github.workflow }}-${{ github.ref }}-web | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-web: | ||
runs-on: ubuntu-latest | ||
|
||
# Skip running workflow on forks. Checking the repository owner still allows | ||
# this to be run on PRs, and then below we disable it from attempting to | ||
# publish. | ||
if: github.repository_owner == 'prql' | ||
|
||
steps: | ||
- name: 📂 Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# Website requires hugo | ||
- name: Setup hugo | ||
uses: peaceiris/actions-hugo@v2.6.0 | ||
|
||
# Book setup, duplicated from `pull-request.yaml` | ||
- uses: baptiste0928/cargo-install@v2 | ||
with: | ||
crate: mdbook | ||
- uses: baptiste0928/cargo-install@v2 | ||
with: | ||
crate: mdbook-footnote | ||
- uses: baptiste0928/cargo-install@v2 | ||
with: | ||
crate: mdbook-admonish | ||
|
||
- uses: baptiste0928/cargo-install@v2 | ||
with: | ||
crate: wasm-pack | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: 💰 Cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
prefix-key: 0.8.1 | ||
save-if: | ||
${{ github.ref == 'refs/heads/web' || github.ref == | ||
'refs/heads/main' }} | ||
|
||
- uses: arduino/setup-task@v1 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: 🕷️ Build website | ||
run: task build-web | ||
|
||
- uses: actions/upload-pages-artifact@v1.0.8 | ||
with: | ||
path: web/website/public/ | ||
|
||
check-links: | ||
# Copied from `test-all.yaml` — run this for all files (not just changed | ||
# ones) here, since we're more likely to change a location of a file that's | ||
# linked _to_. | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
with: | ||
config-file: .github/.markdown-link-check.json | ||
use-quiet-mode: "yes" |
This file was deleted.
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
Oops, something went wrong.