diff --git a/.github/workflows/dusk.yml b/.github/workflows/dusk.yml index a178a592467ce..6166900eafe98 100644 --- a/.github/workflows/dusk.yml +++ b/.github/workflows/dusk.yml @@ -26,6 +26,7 @@ jobs: target: x86_64-apple-darwin - os: macos-latest-xlarge target: aarch64-apple-darwin + runs-on: ${{ matrix.os }} steps: - name: Check out repository @@ -33,21 +34,36 @@ jobs: with: fetch-depth: 16 - - name: Setup dependencies + - name: Setup dependencies (x86_64-linux) if: matrix.os == 'ubuntu-latest' - run: sudo apt update && sudo apt install -y ninja-build + run: | + sudo apt update && \ + sudo apt install -y ninja-build && \ + touch .env + + - name: Setup dependencies (x86_64-apple) + if: startsWith(matrix.target, 'x86_64-apple') + run: | + brew install ninja llvm lld && + echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> .env && + echo 'export LDFLAGS="-L/usr/local/opt/llvm/lib -L/usr/local/opt/llvm/lib/c++ -L/usr/local/opt/llvm/lib/unwind -lunwind"' >> .env && + echo 'export CPPFLAGS="-I/usr/local/opt/llvm/include"' >> .env - - name: Setup dependencies - if: startsWith(matrix.os, 'macos') + - name: Setup dependencies (aarch64-apple) + if: startsWith(matrix.target, 'aarch64-apple') run: | - brew install ninja gettext && - brew link --force gettext + brew install ninja llvm lld && + echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> .env && + echo 'export LDFLAGS="-L/opt/homebrew/opt/llvm/lib -L/opt/homebrew/opt/llvm/lib/c++ -L/opt/homebrew/opt/llvm/lib/unwind -lunwind"' >> .env && + echo 'export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"' >> .env + - name: Generate configuration run: | HOST=${{ matrix.target }} envsubst < config.template.toml > config.toml && cat config.toml + - name: Run build - run: ./x.py dist + run: source .env && ./x.py dist - name: Set artifact name id: artifact-name