Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: support linux aarch64 with ruby 3.1.2
  • Loading branch information
YOU54F committed Apr 5, 2023
commit ff9c05951fccb8ee05efb92b6a6b69b9ea5133dd
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/linux/runtime
/linux/output
/linux/traveling-ruby-gems*
/osx/runtime
/osx/output
/osx/work
/windows/cache
/windows/output
*.sublime-workspace
*.tar.gz
.DS_Store
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ _Note:_ - This is a fork, which currently supports the following platforms and v
| OSX | 3.1.2 | x86_64 | βœ… |
| OSX | 3.1.2 | aarch64 (arm)| βœ… |
| Linux | 3.1.2 | x86_64 | βœ… |
| Linux | 3.1.2 | aarch64 (arm)| ❌ |
| Linux | 3.1.2 | aarch64 (arm)| βœ… |
| Windows| 3.1.2 | x86_64 | ❌ |
| Windows| 3.1.2 | aarch64 (arm)| ❌ |

Expand Down
4 changes: 2 additions & 2 deletions linux/Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
IMAGE_VERSION = "1.0"
VERSION = File.read("../VERSION.txt").strip
RUBY_VERSIONS = File.read("../RUBY_VERSIONS.txt").strip.split(/\s+/)
ARCHITECTURES = ["x86_64"]
ARCHITECTURES = ["x86_64",'arm64']
CONCURRENCY = `./internal/cpucount`.to_i + 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why +1?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure! I pulled that change in from this fork

75afdff#diff-fe8ec1b2975d083dd6bc6eaf2fca4dba61a6466d1991a1cbaf3c9dd27b841941L5

I imagine the internal cpu count, is going to be the max, so adding one doesn't make sense, will remove and retest


task :default => :package
Expand Down Expand Up @@ -41,7 +41,7 @@ ARCHITECTURES.each do |arch|

desc "Build the #{arch} Docker image"
task "image:#{arch}" do
sh "docker build --pull" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why no --pull?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I think that was from testing, I wasn't certain it was using the built image and not pulling the published versioned I had created with the same tag, I added that back in, in the ci branch

I'll add it back in

https://github.com/YOU54F/traveling-ruby/blob/628d1c514f19af7c24e25dcececa3188c03cb188/linux/Rakefile#L44

sh "docker build" \
" -t phusion/traveling-ruby-builder-#{arch}:#{IMAGE_VERSION}" \
" -f image/Dockerfile-#{arch} image"
end
Expand Down
3 changes: 3 additions & 0 deletions linux/image/Dockerfile-arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM --platform=linux/arm64 phusion/holy-build-box:3.0
ADD . /tr_build
RUN env ARCHITECTURE=arm64 /tr_build/install.sh
2 changes: 1 addition & 1 deletion linux/image/Dockerfile-x86_64
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM phusion/holy-build-box-64:3.0
FROM --platform=linux/amd64 phusion/holy-build-box:3.0
ADD . /tr_build
RUN env ARCHITECTURE=x86_64 /tr_build/install.sh