Skip to content

Commit

Permalink
Use the latest version of LDC in automated macOS builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dadoum authored and Adam-le-dev committed May 17, 2024
1 parent bbf63d1 commit c544aab
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 40 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ jobs:
- name: Set-up macOS cross-compilation
run: |
mkdir -p $HOME/.ldc/
LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
curl -LO https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
tar -xf ./MacOSX11.0.sdk.tar.xz -C $HOME
cat << EOF | tee $HOME/.ldc/ldc2.conf
Expand All @@ -163,17 +164,17 @@ jobs:
];
// default switches appended after all explicit command-line switches
post-switches = [
"-I$HOME/ldc2-1.33.0-osx-x86_64/import",
"-I$HOME/ldc2-$LDC_VERSION-osx-x86_64/import",
];
// default directories to be searched for libraries when linking
lib-dirs = [
"$HOME/ldc2-1.33.0-osx-x86_64/lib",
"$HOME/ldc2-$LDC_VERSION-osx-x86_64/lib",
];
};
EOF
mkdir $HOME/ldc-macos
curl -LO https://github.com/ldc-developers/ldc/releases/download/v1.33.0/ldc2-1.33.0-osx-x86_64.tar.xz
tar -xf ./ldc2-1.33.0-osx-x86_64.tar.xz -C $HOME
curl -LO https://github.com/ldc-developers/ldc/releases/download/v$LDC_VERSION/ldc2-$LDC_VERSION-osx-x86_64.tar.xz
tar -xf ./ldc2-$LDC_VERSION-osx-x86_64.tar.xz -C $HOME
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libz-dev elfutils clang lld
Expand Down Expand Up @@ -208,6 +209,7 @@ jobs:
- name: Set-up macOS cross-compilation
run: |
mkdir -p $HOME/.ldc/
LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
curl -LO https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
tar -xf ./MacOSX11.0.sdk.tar.xz -C $HOME
cat << EOF | tee $HOME/.ldc/ldc2.conf
Expand All @@ -225,17 +227,17 @@ jobs:
];
// default switches appended after all explicit command-line switches
post-switches = [
"-I$HOME/ldc2-1.33.0-osx-arm64/import",
"-I$HOME/ldc2-$LDC_VERSION-osx-arm64/import",
];
// default directories to be searched for libraries when linking
lib-dirs = [
"$HOME/ldc2-1.33.0-osx-arm64/lib",
"$HOME/ldc2-$LDC_VERSION-osx-arm64/lib",
];
};
EOF
mkdir $HOME/ldc-macos
curl -LO https://github.com/ldc-developers/ldc/releases/download/v1.33.0/ldc2-1.33.0-osx-arm64.tar.xz
tar -xf ./ldc2-1.33.0-osx-arm64.tar.xz -C $HOME
curl -LO https://github.com/ldc-developers/ldc/releases/download/v$LDC_VERSION/ldc2-$LDC_VERSION-osx-arm64.tar.xz
tar -xf ./ldc2-$LDC_VERSION-osx-arm64.tar.xz -C $HOME
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libz-dev elfutils clang lld
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/build-dlangui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ jobs:
- name: Set-up macOS cross-compilation
run: |
mkdir -p $HOME/.ldc/
LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
curl -LO https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
tar -xf ./MacOSX11.0.sdk.tar.xz -C $HOME
cat << EOF | tee $HOME/.ldc/ldc2.conf
Expand All @@ -165,17 +166,17 @@ jobs:
];
// default switches appended after all explicit command-line switches
post-switches = [
"-I$HOME/ldc2-1.33.0-osx-x86_64/import",
"-I$HOME/ldc2-$LDC_VERSION-osx-x86_64/import",
];
// default directories to be searched for libraries when linking
lib-dirs = [
"$HOME/ldc2-1.33.0-osx-x86_64/lib",
"$HOME/ldc2-$LDC_VERSION-osx-x86_64/lib",
];
};
EOF
mkdir $HOME/ldc-macos
curl -LO https://github.com/ldc-developers/ldc/releases/download/v1.33.0/ldc2-1.33.0-osx-x86_64.tar.xz
tar -xf ./ldc2-1.33.0-osx-x86_64.tar.xz -C $HOME
curl -LO https://github.com/ldc-developers/ldc/releases/download/v$LDC_VERSION/ldc2-$LDC_VERSION-osx-x86_64.tar.xz
tar -xf ./ldc2-$LDC_VERSION-osx-x86_64.tar.xz -C $HOME
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libz-dev elfutils clang lld
Expand Down Expand Up @@ -210,6 +211,7 @@ jobs:
- name: Set-up macOS cross-compilation
run: |
mkdir -p $HOME/.ldc/
LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
curl -LO https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
tar -xf ./MacOSX11.0.sdk.tar.xz -C $HOME
cat << EOF | tee $HOME/.ldc/ldc2.conf
Expand All @@ -227,17 +229,17 @@ jobs:
];
// default switches appended after all explicit command-line switches
post-switches = [
"-I$HOME/ldc2-1.33.0-osx-arm64/import",
"-I$HOME/ldc2-$LDC_VERSION-osx-arm64/import",
];
// default directories to be searched for libraries when linking
lib-dirs = [
"$HOME/ldc2-1.33.0-osx-arm64/lib",
"$HOME/ldc2-$LDC_VERSION-osx-arm64/lib",
];
};
EOF
mkdir $HOME/ldc-macos
curl -LO https://github.com/ldc-developers/ldc/releases/download/v1.33.0/ldc2-1.33.0-osx-arm64.tar.xz
tar -xf ./ldc2-1.33.0-osx-arm64.tar.xz -C $HOME
curl -LO https://github.com/ldc-developers/ldc/releases/download/v$LDC_VERSION/ldc2-$LDC_VERSION-osx-arm64.tar.xz
tar -xf ./ldc2-$LDC_VERSION-osx-arm64.tar.xz -C $HOME
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libz-dev elfutils clang lld
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/build-gtk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ jobs:
- name: Set-up macOS cross-compilation
run: |
mkdir -p $HOME/.ldc/
LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
curl -LO https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
tar -xf ./MacOSX11.0.sdk.tar.xz -C $HOME
cat << EOF | tee $HOME/.ldc/ldc2.conf
Expand All @@ -164,17 +165,17 @@ jobs:
];
// default switches appended after all explicit command-line switches
post-switches = [
"-I$HOME/ldc2-1.33.0-osx-x86_64/import",
"-I$HOME/ldc2-$LDC_VERSION-osx-x86_64/import",
];
// default directories to be searched for libraries when linking
lib-dirs = [
"$HOME/ldc2-1.33.0-osx-x86_64/lib",
"$HOME/ldc2-$LDC_VERSION-osx-x86_64/lib",
];
};
EOF
mkdir $HOME/ldc-macos
curl -LO https://github.com/ldc-developers/ldc/releases/download/v1.33.0/ldc2-1.33.0-osx-x86_64.tar.xz
tar -xf ./ldc2-1.33.0-osx-x86_64.tar.xz -C $HOME
curl -LO https://github.com/ldc-developers/ldc/releases/download/v$LDC_VERSION/ldc2-$LDC_VERSION-osx-x86_64.tar.xz
tar -xf ./ldc2-$LDC_VERSION-osx-x86_64.tar.xz -C $HOME
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libz-dev elfutils clang lld
Expand Down Expand Up @@ -210,6 +211,7 @@ jobs:
- name: Set-up macOS cross-compilation
run: |
mkdir -p $HOME/.ldc/
LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
curl -LO https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
tar -xf ./MacOSX11.0.sdk.tar.xz -C $HOME
cat << EOF | tee $HOME/.ldc/ldc2.conf
Expand All @@ -227,17 +229,17 @@ jobs:
];
// default switches appended after all explicit command-line switches
post-switches = [
"-I$HOME/ldc2-1.33.0-osx-arm64/import",
"-I$HOME/ldc2-$LDC_VERSION-osx-arm64/import",
];
// default directories to be searched for libraries when linking
lib-dirs = [
"$HOME/ldc2-1.33.0-osx-arm64/lib",
"$HOME/ldc2-$LDC_VERSION-osx-arm64/lib",
];
};
EOF
mkdir $HOME/ldc-macos
curl -LO https://github.com/ldc-developers/ldc/releases/download/v1.33.0/ldc2-1.33.0-osx-arm64.tar.xz
tar -xf ./ldc2-1.33.0-osx-arm64.tar.xz -C $HOME
curl -LO https://github.com/ldc-developers/ldc/releases/download/v$LDC_VERSION/ldc2-$LDC_VERSION-osx-arm64.tar.xz
tar -xf ./ldc2-$LDC_VERSION-osx-arm64.tar.xz -C $HOME
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libz-dev elfutils clang lld
Expand Down
36 changes: 20 additions & 16 deletions .github/workflows/build-qt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ jobs:

- uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-1.33.0
compiler: ldc-latest

- name: Set-up macOS cross-compilation
run: |
mkdir -p $HOME/.ldc/
LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
curl -LO https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
tar -xf ./MacOSX11.0.sdk.tar.xz -C $HOME
cat << EOF | tee $HOME/.ldc/ldc2.conf
Expand All @@ -84,7 +85,7 @@ jobs:
"-Xcc=-isysroot",
"-Xcc=$HOME/MacOSX11.0.sdk",
"-Xcc=-F",
"-Xcc=$HOME/ldc2-1.33.0-osx-x86_64/lib",
"-Xcc=$HOME/ldc2-$LDC_VERSION-osx-x86_64/lib",
"-Xcc=-mmacosx-version-min=12.6",
"-L=-platform_version",
"-L=macos",
Expand All @@ -94,25 +95,26 @@ jobs:
];
// default switches appended after all explicit command-line switches
post-switches = [
"-I$HOME/ldc2-1.33.0-osx-x86_64/import",
"-I$HOME/ldc2-$LDC_VERSION-osx-x86_64/import",
];
// default directories to be searched for libraries when linking
lib-dirs = [
"$HOME/ldc2-1.33.0-osx-x86_64/lib",
"$HOME/ldc2-$LDC_VERSION-osx-x86_64/lib",
];
};
EOF
mkdir $HOME/ldc-macos
curl -LO https://github.com/ldc-developers/ldc/releases/download/v1.33.0/ldc2-1.33.0-osx-x86_64.tar.xz
tar -xf ./ldc2-1.33.0-osx-x86_64.tar.xz -C $HOME
curl -LO https://github.com/ldc-developers/ldc/releases/download/v$LDC_VERSION/ldc2-$LDC_VERSION-osx-x86_64.tar.xz
tar -xf ./ldc2-$LDC_VERSION-osx-x86_64.tar.xz -C $HOME
brew fetch --force --bottle-tag=monterey llvm@16
brew install $(brew --cache --bottle-tag=monterey llvm@16)
cp /home/linuxbrew/.linuxbrew/Cellar/llvm@16/16.0.6/lib/c++/* $HOME/ldc2-1.33.0-osx-x86_64/lib
cp /home/linuxbrew/.linuxbrew/Cellar/llvm@16/16.0.6/lib/c++/* $HOME/ldc2-$LDC_VERSION-osx-x86_64/lib
rm -rf /home/linuxbrew/.linuxbrew
- name: Set-up Qt for cross-compilation
run:
cp -r $Qt5_DIR/lib/* $HOME/ldc2-1.33.0-osx-x86_64/lib
LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
cp -r $Qt5_DIR/lib/* $HOME/ldc2-$LDC_VERSION-osx-x86_64/lib

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libz-dev elfutils clang lld-15
Expand Down Expand Up @@ -151,7 +153,7 @@ jobs:

- uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-1.33.0
compiler: ldc-latest

- name: Set up Homebrew
id: set-up-homebrew
Expand All @@ -170,6 +172,7 @@ jobs:
- name: Set-up macOS cross-compilation
run: |
mkdir -p $HOME/.ldc/
LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
curl -LO https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
tar -xf ./MacOSX11.0.sdk.tar.xz -C $HOME
cat << EOF | tee $HOME/.ldc/ldc2.conf
Expand All @@ -184,7 +187,7 @@ jobs:
"-Xcc=-isysroot",
"-Xcc=$HOME/MacOSX11.0.sdk",
"-Xcc=-F",
"-Xcc=$HOME/ldc2-1.33.0-osx-arm64/lib",
"-Xcc=$HOME/ldc2-$LDC_VERSION-osx-arm64/lib",
"-Xcc=-mmacosx-version-min=12.6",
"-L=-platform_version",
"-L=macos",
Expand All @@ -194,25 +197,26 @@ jobs:
];
// default switches appended after all explicit command-line switches
post-switches = [
"-I$HOME/ldc2-1.33.0-osx-arm64/import",
"-I$HOME/ldc2-$LDC_VERSION-osx-arm64/import",
];
// default directories to be searched for libraries when linking
lib-dirs = [
"$HOME/ldc2-1.33.0-osx-arm64/lib",
"$HOME/ldc2-$LDC_VERSION-osx-arm64/lib",
];
};
EOF
mkdir $HOME/ldc-macos
curl -LO https://github.com/ldc-developers/ldc/releases/download/v1.33.0/ldc2-1.33.0-osx-arm64.tar.xz
tar -xf ./ldc2-1.33.0-osx-arm64.tar.xz -C $HOME
curl -LO https://github.com/ldc-developers/ldc/releases/download/v$LDC_VERSION/ldc2-$LDC_VERSION-osx-arm64.tar.xz
tar -xf ./ldc2-$LDC_VERSION-osx-arm64.tar.xz -C $HOME
brew fetch --force --bottle-tag=arm64_monterey llvm@16
brew install $(brew --cache --bottle-tag=arm64_monterey llvm@16)
cp /home/linuxbrew/.linuxbrew/Cellar/llvm@16/16.0.6/lib/c++/* $HOME/ldc2-1.33.0-osx-arm64/lib
cp /home/linuxbrew/.linuxbrew/Cellar/llvm@16/16.0.6/lib/c++/* $HOME/ldc2-$LDC_VERSION-osx-arm64/lib
rm -rf /home/linuxbrew/.linuxbrew
- name: Set-up Qt for cross-compilation
run:
cp -r $Qt5_DIR/lib/* $HOME/ldc2-1.33.0-osx-arm64/lib
LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
cp -r $Qt5_DIR/lib/* $HOME/ldc2-$LDC_VERSION-osx-arm64/lib

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libz-dev elfutils clang lld-15
Expand Down

0 comments on commit c544aab

Please sign in to comment.