-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new webserver release script, basic-cli release script updates #6014
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
8b6bb9d
prep basic-cli 0.5 release
Anton-4 e266158
arm64 fixes
Anton-4 a9b9776
specify linux_x86_64
Anton-4 d5eca4a
x86_64 > x64
Anton-4 628f41a
build before final test
Anton-4 08f7865
fix path, back to main branch
Anton-4 4b53557
added debug upload
Anton-4 e11725b
add prebuilt-platform flag
Anton-4 6650f62
try with musl
Anton-4 63d2f8e
Merge branch 'main' into basic-cli-5-release
Anton-4 48d1429
Merge branch 'main' into basic-cli-5-release
Anton-4 e07a749
Merge branch 'main' into basic-cli-5-release
Anton-4 d9914bb
temp disable other workflows
Anton-4 3ada01d
sudo musl-tools fix
Anton-4 ad4b929
added flags required for ring (musl)
Anton-4 e5c584b
test with all examples
Anton-4 e6bf12f
fix if
Anton-4 51c7ba2
fix path issue
Anton-4 dc8d709
fix examples path
Anton-4 cb488ea
use prebuilt-platform flag
Anton-4 abd622b
Update basic_cli_build_release.yml
Anton-4 badc45d
ci install ncat(nmap)
Anton-4 04b620b
apparently nmap does not contain ncat
Anton-4 9217494
set up basic_webserver build
Anton-4 4cb9b24
chmod +x
Anton-4 ee74635
forgot cd
Anton-4 a9c9273
prevent undefined symbol
Anton-4 116aad2
get brotli started
Anton-4 71cb2ed
build with main branch
Anton-4 75e04a5
cleanup
Anton-4 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,164 @@ | ||
on: | ||
# pull_request: | ||
workflow_dispatch: | ||
|
||
# this cancels workflows currently in progress if you start a new one | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
# use .tar.gz for quick testing | ||
ARCHIVE_FORMAT: .tar.br | ||
BASIC_WEBSERVER_BRANCH: main | ||
|
||
jobs: | ||
fetch-releases: | ||
runs-on: [ubuntu-20.04] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz | ||
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_arm64-latest.tar.gz | ||
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_x86_64-latest.tar.gz | ||
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-latest.tar.gz | ||
|
||
- name: Save roc_nightly archives | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: roc_nightly-* | ||
|
||
build-linux-x86_64-files: | ||
runs-on: [ubuntu-20.04] | ||
needs: [fetch-releases] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download the previously uploaded roc_nightly archives | ||
uses: actions/download-artifact@v3 | ||
|
||
- name: build basic-webserver with surgical linker and also with legacy linker | ||
env: | ||
CARGO_BUILD_TARGET: x86_64-unknown-linux-musl | ||
run: ./ci/build_basic_webserver.sh linux_x86_64 "--linker legacy" | ||
|
||
- name: Save .rh, .rm and .o file | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux-x86_64-files | ||
path: | | ||
basic-webserver/platform/metadata_linux-x64.rm | ||
basic-webserver/platform/linux-x64.rh | ||
basic-webserver/platform/linux-x64.o | ||
|
||
|
||
build-linux-arm64-files: | ||
runs-on: [self-hosted, Linux, ARM64] | ||
needs: [fetch-releases] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download the previously uploaded roc_nightly archives | ||
uses: actions/download-artifact@v3 | ||
|
||
- 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 | ||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS: "-Clink-self-contained=yes -Clinker=rust-lld" | ||
run: ./ci/build_basic_webserver.sh linux_arm64 | ||
|
||
- name: Save .o file | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux-arm64-files | ||
path: | | ||
basic-webserver/platform/linux-arm64.o | ||
|
||
build-macos-x86_64-files: | ||
runs-on: [macos-11] # I expect the generated files to work on macOS 12 and 13 | ||
needs: [fetch-releases] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download the previously uploaded roc_nightly archives | ||
uses: actions/download-artifact@v3 | ||
|
||
- run: ./ci/build_basic_webserver.sh macos_x86_64 | ||
|
||
- name: Save .o files | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: macos-x86_64-files | ||
path: | | ||
basic-webserver/platform/macos-x64.o | ||
|
||
build-macos-apple-silicon-files: | ||
name: build apple silicon .o file | ||
runs-on: [self-hosted, macOS, ARM64] | ||
needs: [fetch-releases] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download the previously uploaded roc_nightly archives | ||
uses: actions/download-artifact@v3 | ||
|
||
- run: ./ci/build_basic_webserver.sh macos_apple_silicon | ||
|
||
- name: Save macos-arm64.o file | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: macos-apple-silicon-files | ||
path: | | ||
basic-webserver/platform/macos-arm64.o | ||
|
||
create-release-archive: | ||
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: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: remove all folders except the ci folder | ||
run: ls | grep -v ci | xargs rm -rf | ||
|
||
- name: Download the previously uploaded files | ||
uses: actions/download-artifact@v3 | ||
|
||
- name: mv roc nightly and simplify name | ||
run: mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "linux_x86_64") ./roc_nightly.tar.gz | ||
|
||
- name: decompress the tar | ||
run: tar -xzvf roc_nightly.tar.gz | ||
|
||
- name: delete tar | ||
run: rm roc_nightly.tar.gz | ||
|
||
- name: rename nightly folder | ||
run: mv roc_nightly* roc_nightly | ||
|
||
- run: | | ||
git clone https://github.com/roc-lang/basic-webserver.git | ||
cd basic-webserver | ||
git checkout ${{ env.BASIC_WEBSERVER_BRANCH }} | ||
cd .. | ||
|
||
- run: cp macos-apple-silicon-files/* ./basic-webserver/platform | ||
|
||
- run: cp linux-x86_64-files/* ./basic-webserver/platform | ||
|
||
- run: cp linux-arm64-files/* ./basic-webserver/platform | ||
|
||
- run: cp macos-x86_64-files/* ./basic-webserver/platform | ||
|
||
- run: ./roc_nightly/roc build --bundle=${{ env.ARCHIVE_FORMAT }} ./basic-webserver/platform/main.roc | ||
|
||
- run: echo "TAR_FILENAME=$(ls -d basic-webserver/platform/* | grep ${{ env.ARCHIVE_FORMAT }})" >> $GITHUB_ENV | ||
|
||
- name: Upload platform archive | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: basic-webserver-platform | ||
path: | | ||
${{ env.TAR_FILENAME }} |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only seems to do it with legacy linker...
Is that a mistake in the name or the implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mistake in the name, I'll fix it in a future PR.