mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-07 14:44:59 +00:00
parent
578e92563c
commit
7e982b55f5
9 changed files with 1 additions and 214 deletions
20
.github/workflows/docker.yml
vendored
20
.github/workflows/docker.yml
vendored
|
@ -94,22 +94,4 @@ jobs:
|
|||
- name: Test with hello world
|
||||
run: |
|
||||
curl -OL https://raw.githubusercontent.com/roc-lang/examples/refs/heads/main/examples/HelloWorld/main.roc
|
||||
docker compose -f docker/nightly-debian-bookworm/docker-compose.yml run roc main.roc
|
||||
|
||||
nightly-debian-buster:
|
||||
name: nightly-debian-buster
|
||||
runs-on: [ubuntu-22.04]
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Copy example docker file
|
||||
run: cp docker/nightly-debian-buster/docker-compose.example.yml docker/nightly-debian-buster/docker-compose.yml
|
||||
|
||||
- name: Build image
|
||||
run: docker compose -f docker/nightly-debian-buster/docker-compose.yml build
|
||||
|
||||
- name: Test with hello world
|
||||
run: |
|
||||
curl -OL https://raw.githubusercontent.com/roc-lang/examples/refs/heads/main/examples/HelloWorld/main.roc
|
||||
docker compose -f docker/nightly-debian-buster/docker-compose.yml run roc main.roc
|
||||
docker compose -f docker/nightly-debian-bookworm/docker-compose.yml run roc main.roc
|
39
.github/workflows/nightly_old_linux_arm64.yml
vendored
39
.github/workflows/nightly_old_linux_arm64.yml
vendored
|
@ -1,39 +0,0 @@
|
|||
on:
|
||||
#pull_request:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 9 * * *'
|
||||
|
||||
name: Nightly Release Old Linux arm64 using Earthly
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: build and package nightly release
|
||||
runs-on: [self-hosted, Linux, ARM64]
|
||||
timeout-minutes: 180
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: get commit SHA
|
||||
run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
|
||||
|
||||
- name: get date
|
||||
run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV
|
||||
|
||||
- name: build file name
|
||||
env:
|
||||
DATE: ${{ env.DATE }}
|
||||
SHA: ${{ env.SHA }}
|
||||
run: echo "RELEASE_FOLDER_NAME=roc_nightly-old_linux_arm64-$DATE-$SHA" >> $GITHUB_ENV
|
||||
|
||||
- run: earthly --version
|
||||
|
||||
- name: build release with earthly
|
||||
run: earthly +build-nightly-release --RELEASE_FOLDER_NAME=${{ env.RELEASE_FOLDER_NAME }} --ZIG_ARCH=aarch64
|
||||
|
||||
- name: Upload roc nightly tar. Actually uploading to github releases has to be done manually.
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
|
||||
path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
|
||||
retention-days: 4
|
42
.github/workflows/nightly_old_linux_x86_64.yml
vendored
42
.github/workflows/nightly_old_linux_x86_64.yml
vendored
|
@ -1,42 +0,0 @@
|
|||
on:
|
||||
#pull_request:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 9 * * *'
|
||||
|
||||
name: Nightly Release Old Linux x86_64 using Earthly
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: build and package nightly release
|
||||
runs-on: [ubuntu-22.04]
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: get commit SHA
|
||||
run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
|
||||
|
||||
- name: get date
|
||||
run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV
|
||||
|
||||
- name: build file name
|
||||
env:
|
||||
DATE: ${{ env.DATE }}
|
||||
SHA: ${{ env.SHA }}
|
||||
run: echo "RELEASE_FOLDER_NAME=roc_nightly-old_linux_x86_64-$DATE-$SHA" >> $GITHUB_ENV
|
||||
|
||||
- name: install earthly
|
||||
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'
|
||||
|
||||
- run: earthly --version
|
||||
|
||||
- name: build release with earthly
|
||||
run: earthly +build-nightly-release --RELEASE_FOLDER_NAME=${{ env.RELEASE_FOLDER_NAME }} --RUSTFLAGS="-C target-cpu=x86-64"
|
||||
|
||||
- name: Upload roc nightly tar. Actually uploading to github releases has to be done manually.
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
|
||||
path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
|
||||
retention-days: 4
|
16
.github/workflows/test_alpha_many_os.yml
vendored
16
.github/workflows/test_alpha_many_os.yml
vendored
|
@ -65,20 +65,4 @@ jobs:
|
|||
|
||||
- name: prep and run basic tests
|
||||
run: |
|
||||
./ci/basic_release_test.sh roc_release.tar.gz
|
||||
|
||||
- name: test with old linux release (x86_64)
|
||||
if: startsWith(matrix.os, 'ubuntu') && !endsWith(matrix.os, '-arm')
|
||||
run: |
|
||||
ASSETS_URL="${{ steps.get_release.outputs.assets_url }}"
|
||||
DOWNLOAD_URL=$(curl -sH "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$ASSETS_URL" | jq -r '.[] | select(.name | startswith("roc-old_linux_x86_64-")) | .browser_download_url')
|
||||
curl -fLH "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$DOWNLOAD_URL" -o roc_release.tar.gz
|
||||
./ci/basic_release_test.sh roc_release.tar.gz
|
||||
|
||||
- name: test with old linux release (arm64)
|
||||
if: startsWith(matrix.os, 'ubuntu') && endsWith(matrix.os, '-arm')
|
||||
run: |
|
||||
ASSETS_URL="${{ steps.get_release.outputs.assets_url }}"
|
||||
DOWNLOAD_URL=$(curl -sH "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$ASSETS_URL" | jq -r '.[] | select(.name | startswith("roc-old_linux_arm64-")) | .browser_download_url')
|
||||
curl -fLH "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$DOWNLOAD_URL" -o roc_release.tar.gz
|
||||
./ci/basic_release_test.sh roc_release.tar.gz
|
12
.github/workflows/test_nightly_many_os.yml
vendored
12
.github/workflows/test_nightly_many_os.yml
vendored
|
@ -48,16 +48,4 @@ jobs:
|
|||
|
||||
- name: prep and run basic tests
|
||||
run: |
|
||||
./ci/basic_release_test.sh roc_release.tar.gz
|
||||
|
||||
- name: test with old linux release (x86_64)
|
||||
if: startsWith(matrix.os, 'ubuntu') && !endsWith(matrix.os, '-arm')
|
||||
run: |
|
||||
curl -fL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-old_linux_x86_64-latest.tar.gz -o roc_release.tar.gz
|
||||
./ci/basic_release_test.sh roc_release.tar.gz
|
||||
|
||||
- name: test with old linux release (arm64)
|
||||
if: startsWith(matrix.os, 'ubuntu') && endsWith(matrix.os, '-arm')
|
||||
run: |
|
||||
curl -fL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-old_linux_arm64-latest.tar.gz -o roc_release.tar.gz
|
||||
./ci/basic_release_test.sh roc_release.tar.gz
|
59
Earthfile
59
Earthfile
|
@ -1,59 +0,0 @@
|
|||
|
||||
VERSION 0.6
|
||||
FROM rust:1.77.2-slim-buster # make sure to update rust-toolchain.toml too so that everything uses the same rust version
|
||||
WORKDIR /earthbuild
|
||||
|
||||
prep-debian:
|
||||
RUN apt -y update
|
||||
|
||||
install-other-libs:
|
||||
FROM +prep-debian
|
||||
RUN apt -y install wget git
|
||||
RUN apt -y install libunwind-dev pkg-config zlib1g-dev
|
||||
RUN apt -y install unzip # for www/build.sh
|
||||
|
||||
install-zig-llvm:
|
||||
ARG ZIG_ARCH
|
||||
FROM +install-other-libs
|
||||
# zig
|
||||
RUN wget -c https://ziglang.org/download/0.13.0/zig-linux-$ZIG_ARCH-0.13.0.tar.xz --no-check-certificate
|
||||
RUN tar -xf zig-linux-$ZIG_ARCH-0.13.0.tar.xz
|
||||
RUN ln -s /earthbuild/zig-linux-$ZIG_ARCH-0.13.0/zig /bin/zig
|
||||
# zig builtins wasm tests
|
||||
RUN apt -y install build-essential
|
||||
# llvm
|
||||
RUN apt -y install lsb-release software-properties-common gnupg
|
||||
RUN wget https://apt.llvm.org/llvm.sh
|
||||
RUN chmod +x llvm.sh
|
||||
RUN ./llvm.sh 18
|
||||
RUN ln -s /usr/bin/clang-18 /usr/bin/clang
|
||||
# use lld as linker
|
||||
RUN ln -s /usr/bin/lld-18 /usr/bin/ld.lld
|
||||
RUN apt -y install libpolly-18-dev # required by llvm-sys crate
|
||||
ENV RUSTFLAGS="-C link-arg=-fuse-ld=lld -C target-cpu=native"
|
||||
RUN apt -y install libssl-dev
|
||||
RUN wget https://rustwasm.github.io/wasm-pack/installer/init.sh -O init.sh && sh init.sh
|
||||
# sccache
|
||||
RUN cargo install sccache --locked
|
||||
RUN sccache -V
|
||||
ENV RUSTC_WRAPPER=/usr/local/cargo/bin/sccache
|
||||
ENV SCCACHE_DIR=/earthbuild/sccache_dir
|
||||
ENV CARGO_INCREMENTAL=0 # no need to recompile package when using new function
|
||||
|
||||
copy-dirs:
|
||||
ARG ZIG_ARCH
|
||||
FROM +install-zig-llvm --ZIG_ARCH=$ZIG_ARCH
|
||||
COPY --dir crates examples Cargo.toml Cargo.lock version.txt .cargo www rust-toolchain.toml ./
|
||||
|
||||
build-nightly-release:
|
||||
ARG RELEASE_FOLDER_NAME
|
||||
ARG RUSTFLAGS
|
||||
ARG ZIG_ARCH=x86_64
|
||||
FROM +copy-dirs --ZIG_ARCH=$ZIG_ARCH
|
||||
COPY --dir .git LICENSE LEGAL_DETAILS ci ./
|
||||
# version.txt is used by the CLI: roc --version
|
||||
RUN ./ci/write_version.sh
|
||||
RUN RUSTFLAGS=$RUSTFLAGS cargo build --profile=release-with-lto --locked --bin roc --bin roc_language_server
|
||||
RUN ./ci/package_release.sh $RELEASE_FOLDER_NAME
|
||||
RUN ls
|
||||
SAVE ARTIFACT ./$RELEASE_FOLDER_NAME.tar.gz AS LOCAL $RELEASE_FOLDER_NAME.tar.gz
|
|
@ -1,18 +0,0 @@
|
|||
FROM debian:buster
|
||||
|
||||
RUN apt-get update --fix-missing
|
||||
RUN apt-get upgrade --yes
|
||||
|
||||
RUN apt-get install --yes wget
|
||||
|
||||
# you can leave out libc-dev and binutils if you don't need the REPL
|
||||
RUN apt-get install --yes libc-dev binutils
|
||||
|
||||
RUN wget -q -O roc.tar.gz https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-old_linux_x86_64-latest.tar.gz
|
||||
|
||||
RUN mkdir /usr/lib/roc
|
||||
|
||||
RUN tar -xvz -f roc.tar.gz --directory /usr/lib/roc --strip-components=1
|
||||
|
||||
ENV PATH="$PATH:/usr/lib/roc"
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
version: "3"
|
||||
services:
|
||||
roc:
|
||||
build: .
|
||||
entrypoint: roc
|
||||
working_dir: /home/ubuntu/app
|
||||
volumes:
|
||||
- ../../:/home/ubuntu/app
|
|
@ -3,7 +3,6 @@
|
|||
# - update `channel = "RUST_VERSION"`
|
||||
# - update `channel = "RUST_VERSION"` in examples/platform-switching/rust-platform/rust-toolchain.toml
|
||||
# - update `channel = "RUST_VERSION"` in examples/glue/rust-platform/rust-toolchain.toml
|
||||
# - update FROM rust:RUST_VERSION-slim-buster in Earthfile
|
||||
# - to update the nightly version:
|
||||
# - Find the latest nightly release that matches RUST_VERSION here: https://github.com/oxalica/rust-overlay/tree/master/manifests/nightly/2024
|
||||
# - update `channel = "nightly-OLD_DATE"` below
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue