Skip to content

Commit

Permalink
Merge pull request #6921 from roc-lang/upgrade-llvm-zig
Browse files Browse the repository at this point in the history
Upgrade llvm 18 zig 13
  • Loading branch information
lukewilliamboswell authored Dec 13, 2024
2 parents aa9ffcd + 6ecf25b commit a0de21d
Show file tree
Hide file tree
Showing 99 changed files with 1,996 additions and 1,256 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/basic_cli_build_release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
# pull_request:
# pull_request:
workflow_dispatch:

# this cancels workflows currently in progress if you start a new one
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Save roc_nightly archives
uses: actions/upload-artifact@v4
with:
path: roc_nightly-*
path: roc_nightly-*

build-linux-x86_64-files:
runs-on: [ubuntu-20.04]
Expand All @@ -71,7 +71,6 @@ jobs:
basic-cli/platform/linux-x64.rh
basic-cli/platform/linux-x64.a
build-linux-arm64-files:
runs-on: [self-hosted, Linux, ARM64]
needs: [prepare]
Expand All @@ -84,8 +83,8 @@ jobs:
- name: build basic-cli
env:
CARGO_BUILD_TARGET: aarch64-unknown-linux-musl
CC_aarch64_unknown_linux_musl: clang-16
AR_aarch64_unknown_linux_musl: llvm-ar-16
CC_aarch64_unknown_linux_musl: clang-18
AR_aarch64_unknown_linux_musl: llvm-ar-18
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS: "-Clink-self-contained=yes -Clinker=rust-lld"
run: ./ci/build_basic_cli.sh linux_arm64

Expand Down Expand Up @@ -134,7 +133,13 @@ jobs:
basic-cli/platform/macos-arm64.a
create-release-archive:
needs: [build-linux-x86_64-files, build-linux-arm64-files, build-macos-x86_64-files, build-macos-apple-silicon-files]
needs:
[
build-linux-x86_64-files,
build-linux-arm64-files,
build-macos-x86_64-files,
build-macos-apple-silicon-files,
]
name: create release archive
runs-on: [ubuntu-20.04]
steps:
Expand Down Expand Up @@ -202,7 +207,6 @@ jobs:
needs: [create-release-archive]
runs-on: [ubuntu-20.04]
steps:

- name: Download the previously uploaded files
uses: actions/download-artifact@v4

Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/basic_webserver_build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ jobs:
#- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_x86_64-TESTING.tar.gz
#- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-TESTING.tar.gz


- name: Save roc_nightly archives
uses: actions/upload-artifact@v4
with:
path: roc_nightly-*
path: roc_nightly-*

build-linux-x86_64-files:
runs-on: [ubuntu-20.04]
Expand All @@ -57,7 +56,6 @@ jobs:
basic-webserver/platform/linux-x64.rh
basic-webserver/platform/linux-x64.a
build-linux-arm64-files:
runs-on: [self-hosted, Linux, ARM64]
needs: [fetch-releases]
Expand All @@ -70,8 +68,8 @@ jobs:
- name: build basic-webserver
env:
CARGO_BUILD_TARGET: aarch64-unknown-linux-musl
CC_aarch64_unknown_linux_musl: clang-16
AR_aarch64_unknown_linux_musl: llvm-ar-16
CC_aarch64_unknown_linux_musl: clang-18
AR_aarch64_unknown_linux_musl: llvm-ar-18
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS: "-Clink-self-contained=yes -Clinker=rust-lld"
run: ./ci/build_basic_webserver.sh linux_arm64

Expand Down Expand Up @@ -120,7 +118,13 @@ jobs:
basic-webserver/platform/macos-arm64.a
create-release-archive:
needs: [build-linux-x86_64-files, build-linux-arm64-files, build-macos-x86_64-files, build-macos-apple-silicon-files]
needs:
[
build-linux-x86_64-files,
build-linux-arm64-files,
build-macos-x86_64-files,
build-macos-apple-silicon-files,
]
name: create release archive
runs-on: [ubuntu-20.04]
steps:
Expand Down
55 changes: 29 additions & 26 deletions .github/workflows/macos_x86_64.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
on:
workflow_call:
workflow_call:

name: Macos x86-64 rust tests

env:
RUST_BACKTRACE: 1
RUST_BACKTRACE: 1

jobs:
test-rust-macos-x86-64:
runs-on: [self-hosted, macOS, X64]
timeout-minutes: 90
env:
RUSTC_WRAPPER: /Users/username1/.cargo/bin/sccache
steps:
- uses: actions/checkout@v4

- name: set LLVM_SYS_160_PREFIX
run: echo "LLVM_SYS_160_PREFIX=$(brew --prefix llvm@16)" >> $GITHUB_ENV

- name: Update PATH to use zig 11
run: |
echo "PATH=/Users/username1/Downloads/zig-macos-x86_64-0.11.0:$PATH" >> $GITHUB_ENV
- run: zig version

- name: test_gen llvm tests
run: cargo nextest-gen-llvm --release --no-fail-fast --locked -E "package(test_gen) - test(gen_str::str_append_scalar)"

- name: regular rust tests
run: cargo test --locked --release -- --skip opaque_wrap_function --skip gen_list::bool_list_literal --skip platform_switching_swift --skip swift_ui --skip gen_tags::phantom_polymorphic_record && sccache --show-stats
# swift tests are skipped because of "Could not find or use auto-linked library 'swiftCompatibilityConcurrency'" on macos x86_64 CI machine
# this issue may be caused by using older versions of XCode
test-rust-macos-x86-64:
runs-on: [self-hosted, macOS, X64]
timeout-minutes: 90
env:
RUSTC_WRAPPER: /Users/username1/.cargo/bin/sccache
steps:
- uses: actions/checkout@v4

- name: set LLVM_SYS_180_PREFIX
run: echo "LLVM_SYS_180_PREFIX=$(brew --prefix llvm@18)" >> $GITHUB_ENV

- name: check for zig 13
run: ls /Users/username1/Downloads/zig-macos-x86_64-0.13.0

- name: Update PATH to use zig 13
run: |
echo "PATH=/Users/username1/Downloads/zig-macos-x86_64-0.13.0:$PATH" >> $GITHUB_ENV
- run: zig version

- name: test_gen llvm tests
run: cargo nextest-gen-llvm --release --no-fail-fast --locked -E "package(test_gen) - test(gen_str::str_append_scalar)"

- name: regular rust tests
run: cargo test --locked --release -- --skip opaque_wrap_function --skip gen_list::bool_list_literal --skip platform_switching_swift --skip swift_ui --skip gen_tags::phantom_polymorphic_record && sccache --show-stats
# swift tests are skipped because of "Could not find or use auto-linked library 'swiftCompatibilityConcurrency'" on macos x86_64 CI machine
# this issue may be caused by using older versions of XCode
18 changes: 9 additions & 9 deletions .github/workflows/nightly_linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on:
#pull_request:
workflow_dispatch:
schedule:
- cron: '0 9 * * *'
- cron: "0 9 * * *"

name: Nightly Release Linux arm64/aarch64

Expand All @@ -15,9 +15,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Update PATH to use zig 11
- name: Update PATH to use zig 13
run: |
echo "PATH=/home/username/Downloads/zig-linux-aarch64-0.11.0:$PATH" >> $GITHUB_ENV
echo "PATH=/home/username/Downloads/zig-linux-aarch64-0.13.0:$PATH" >> $GITHUB_ENV
- run: zig version

Expand All @@ -28,15 +28,15 @@ jobs:
run: cargo build --profile=release-with-lto --locked --bin roc --bin roc_language_server

- name: get commit SHA
run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
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 }}
DATE: ${{ env.DATE }}
SHA: ${{ env.SHA }}
run: echo "RELEASE_FOLDER_NAME=roc_nightly-linux_arm64-$DATE-$SHA" >> $GITHUB_ENV

# this makes the roc binary a lot smaller
Expand All @@ -49,6 +49,6 @@ jobs:
- 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
name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz
retention-days: 4
4 changes: 2 additions & 2 deletions .github/workflows/nightly_linux_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Update PATH to use zig 11
- name: Update PATH to use zig 13
run: |
echo "PATH=/home/big-ci-user/Downloads/zig-linux-x86_64-0.11.0:$PATH" >> $GITHUB_ENV
echo "PATH=/home/big-ci-user/Downloads/zig-linux-x86_64-0.13.0:$PATH" >> $GITHUB_ENV
- run: zig version

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nightly_macos_apple_silicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: Nightly Release macOS Apple Silicon

env:
RUST_BACKTRACE: 1
LLVM_SYS_160_PREFIX: /opt/homebrew/opt/llvm@16
LLVM_SYS_180_PREFIX: /opt/homebrew/opt/llvm@18

jobs:
test-and-build:
Expand All @@ -20,9 +20,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Update PATH to use zig 11
- name: Update PATH to use zig 13
run: |
echo "PATH=/Users/m1ci/Downloads/zig-macos-aarch64-0.11.0:$PATH" >> $GITHUB_ENV
echo "PATH=/Users/m1ci/Downloads/zig-macos-aarch64-0.13.0:$PATH" >> $GITHUB_ENV
- run: zig version

Expand Down
110 changes: 55 additions & 55 deletions .github/workflows/nightly_macos_x86_64.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
on:
#pull_request:
workflow_dispatch:
schedule:
- cron: "0 9 * * *" # 9=9am utc+0
#pull_request:
workflow_dispatch:
schedule:
- cron: "0 9 * * *" # 9=9am utc+0

name: Nightly Release macOS x86_64

env:
LLVM_SYS_160_PREFIX: /usr/local/opt/llvm@16
LLVM_SYS_180_PREFIX: /usr/local/opt/llvm@18

jobs:
test-build-upload:
name: build, test, package and upload nightly release
runs-on: [self-hosted, macOS, X64]
timeout-minutes: 120
steps:
- uses: actions/checkout@v4

- name: Update PATH to use zig 11
run: |
echo "PATH=/Users/username1/Downloads/zig-macos-x86_64-0.11.0:$PATH" >> $GITHUB_ENV
- run: zig version

- name: write version to file
run: ./ci/write_version.sh

- name: execute rust tests
run: cargo test --release --locked -- --skip opaque_wrap_function --skip gen_list::bool_list_literal --skip platform_switching_swift --skip swift_ui --skip gen_tags::phantom_polymorphic_record
# swift tests are skipped because of "Could not find or use auto-linked library 'swiftCompatibilityConcurrency'" on macos x86_64 CI machine
# this issue may be caused by using older versions of XCode

- name: build release
run: RUSTFLAGS="-C target-cpu=x86-64" cargo build --profile=release-with-lto --locked --bin roc --bin roc_language_server
# target-cpu=x86-64 -> For maximal compatibility for all CPU's.

- 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-macos_x86_64-$DATE-$SHA" >> $GITHUB_ENV

# this makes the roc binary a lot smaller
- name: strip debug info
run: strip ./target/release-with-lto/roc

- name: package release
run: ./ci/package_release.sh ${{ env.RELEASE_FOLDER_NAME }}

- name: Upload artifact. 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
test-build-upload:
name: build, test, package and upload nightly release
runs-on: [self-hosted, macOS, X64]
timeout-minutes: 120
steps:
- uses: actions/checkout@v4

- name: Update PATH to use zig 13
run: |
echo "PATH=/Users/username1/Downloads/zig-macos-x86_64-0.13.0:$PATH" >> $GITHUB_ENV
- run: zig version

- name: write version to file
run: ./ci/write_version.sh

- name: execute rust tests
run: cargo test --release --locked -- --skip opaque_wrap_function --skip gen_list::bool_list_literal --skip platform_switching_swift --skip swift_ui --skip gen_tags::phantom_polymorphic_record
# swift tests are skipped because of "Could not find or use auto-linked library 'swiftCompatibilityConcurrency'" on macos x86_64 CI machine
# this issue may be caused by using older versions of XCode

- name: build release
run: RUSTFLAGS="-C target-cpu=x86-64" cargo build --profile=release-with-lto --locked --bin roc --bin roc_language_server
# target-cpu=x86-64 -> For maximal compatibility for all CPU's.

- 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-macos_x86_64-$DATE-$SHA" >> $GITHUB_ENV

# this makes the roc binary a lot smaller
- name: strip debug info
run: strip ./target/release-with-lto/roc

- name: package release
run: ./ci/package_release.sh ${{ env.RELEASE_FOLDER_NAME }}

- name: Upload artifact. 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
6 changes: 3 additions & 3 deletions .github/workflows/test_nightly_many_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos-13, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
os: [macos-13, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.11.0
version: 0.13.0

- name: Install zlib on macOS-13
if: matrix.os == 'macos-13'
run: brew install zlib

- name: get the latest release archive for linux (x86_64)
if: startsWith(matrix.os, 'ubuntu')
run: |
run: |
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz
- name: get the latest release archive for macos (x86_64)
Expand Down
Loading

0 comments on commit a0de21d

Please sign in to comment.