Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
46 changes: 12 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
env:
XLINGS_VERSION: 0.4.51
MCPP_VERSION: 0.0.52
XLINGS_NON_INTERACTIVE: '1'

jobs:
build-linux-mcpp:
Expand All @@ -18,11 +19,7 @@ jobs:

- name: Install xlings
run: |
tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
curl -fsSL --retry 10 --retry-all-errors --retry-delay 10 --connect-timeout 30 -o "/tmp/${tarball}" \
"https://github.com/d2learn/xlings/releases/download/v${XLINGS_VERSION}/${tarball}"
tar -xzf "/tmp/${tarball}" -C /tmp
"/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s "v${XLINGS_VERSION}"
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"

- name: Refresh package index
Expand Down Expand Up @@ -58,16 +55,8 @@ jobs:
- uses: actions/checkout@v4

- name: Install xlings
env:
XLINGS_NON_INTERACTIVE: 1
run: |
TARBALL="xlings-${XLINGS_VERSION}-macosx-arm64.tar.gz"
curl -fSL --retry 10 --retry-all-errors --retry-delay 10 --connect-timeout 30 -o "$RUNNER_TEMP/$TARBALL" "https://github.com/d2learn/xlings/releases/download/v${XLINGS_VERSION}/${TARBALL}"
tar -xzf "$RUNNER_TEMP/$TARBALL" -C "$RUNNER_TEMP"
EXTRACT_DIR=$(find "$RUNNER_TEMP" -maxdepth 1 -type d -name "xlings-*" | head -1)
xattr -dr com.apple.quarantine "$EXTRACT_DIR" 2>/dev/null || true
chmod +x "$EXTRACT_DIR/bin/xlings"
"$EXTRACT_DIR/bin/xlings" self install
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s "v${XLINGS_VERSION}"
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"

- name: Refresh package index
Expand All @@ -89,26 +78,19 @@ jobs:
build-windows:
name: build (windows x86_64, mcpp)
runs-on: windows-latest
defaults:
run:
shell: bash
env:
XLINGS_NON_INTERACTIVE: 1
steps:
- uses: actions/checkout@v4

# Everything in one bash step so the in-process PATH is used directly
# (avoids cross-step PATH translation issues for the msys/Windows mix).
- name: Install xlings and build with mcpp
- name: Install xlings
shell: pwsh
run: |
irm https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.ps1 | iex
"$env:USERPROFILE\.xlings\subos\current\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build with mcpp
shell: bash
run: |
set -e
ZIP="xlings-${XLINGS_VERSION}-windows-x86_64.zip"
curl -fSL --retry 10 --retry-all-errors --retry-delay 10 --connect-timeout 30 -o "$RUNNER_TEMP/$ZIP" "https://github.com/d2learn/xlings/releases/download/v${XLINGS_VERSION}/${ZIP}"
unzip -q "$RUNNER_TEMP/$ZIP" -d "$RUNNER_TEMP/xl"
XL=$(find "$RUNNER_TEMP/xl" -name 'xlings.exe' | head -1)
echo "xlings: $XL"
"$XL" self install
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
xlings update
xlings install -y
mcpp build
Expand All @@ -128,11 +110,7 @@ jobs:

- name: Install xlings
run: |
tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
curl -fsSL --retry 10 --retry-all-errors --retry-delay 10 --connect-timeout 30 -o "/tmp/${tarball}" \
"https://github.com/d2learn/xlings/releases/download/v${XLINGS_VERSION}/${tarball}"
tar -xzf "/tmp/${tarball}" -C /tmp
"/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s "v${XLINGS_VERSION}"
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"

- name: Refresh package index
Expand Down
40 changes: 12 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ jobs:
env:
XLINGS_NON_INTERACTIVE: 1
run: |
VERSION_NUM="${XLINGS_VERSION#v}"
TARBALL="xlings-${VERSION_NUM}-linux-x86_64.tar.gz"
curl -fSL --retry 10 --retry-all-errors --retry-delay 10 --connect-timeout 30 -o "$RUNNER_TEMP/$TARBALL" "https://github.com/d2learn/xlings/releases/download/${XLINGS_VERSION}/${TARBALL}"
tar -xzf "$RUNNER_TEMP/$TARBALL" -C "$RUNNER_TEMP"
EXTRACT_DIR=$(find "$RUNNER_TEMP" -maxdepth 1 -type d -name "xlings-*" | head -1)
chmod +x "$EXTRACT_DIR/bin/xlings"
"$EXTRACT_DIR/bin/xlings" self install
echo "PATH=$HOME/.xlings/subos/current/bin:$PATH" >> "$GITHUB_ENV"
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s "${XLINGS_VERSION}"
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"

- name: Refresh package index
run: xlings update
Expand Down Expand Up @@ -79,15 +73,8 @@ jobs:
env:
XLINGS_NON_INTERACTIVE: 1
run: |
VERSION_NUM="${XLINGS_VERSION#v}"
TARBALL="xlings-${VERSION_NUM}-macosx-arm64.tar.gz"
curl -fSL --retry 10 --retry-all-errors --retry-delay 10 --connect-timeout 30 -o "$RUNNER_TEMP/$TARBALL" "https://github.com/d2learn/xlings/releases/download/${XLINGS_VERSION}/${TARBALL}"
tar -xzf "$RUNNER_TEMP/$TARBALL" -C "$RUNNER_TEMP"
EXTRACT_DIR=$(find "$RUNNER_TEMP" -maxdepth 1 -type d -name "xlings-*" | head -1)
xattr -dr com.apple.quarantine "$EXTRACT_DIR" 2>/dev/null || true
chmod +x "$EXTRACT_DIR/bin/xlings"
"$EXTRACT_DIR/bin/xlings" self install
echo "PATH=$HOME/.xlings/subos/current/bin:$PATH" >> "$GITHUB_ENV"
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh | bash -s "${XLINGS_VERSION}"
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"

- name: Refresh package index
run: xlings update
Expand Down Expand Up @@ -122,25 +109,22 @@ jobs:

build-windows:
runs-on: windows-latest
defaults:
run:
shell: bash
env:
XLINGS_NON_INTERACTIVE: 1
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install xlings and build with mcpp
- name: Install xlings
shell: pwsh
run: |
irm https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.ps1 | iex
"$env:USERPROFILE\.xlings\subos\current\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build & package with mcpp
shell: bash
run: |
set -e
VERSION_NUM="${XLINGS_VERSION#v}"
ZIP="xlings-${VERSION_NUM}-windows-x86_64.zip"
curl -fSL --retry 10 --retry-all-errors --retry-delay 10 --connect-timeout 30 -o "$RUNNER_TEMP/$ZIP" "https://github.com/d2learn/xlings/releases/download/${XLINGS_VERSION}/${ZIP}"
unzip -q "$RUNNER_TEMP/$ZIP" -d "$RUNNER_TEMP/xl"
XL=$(find "$RUNNER_TEMP/xl" -name 'xlings.exe' | head -1)
"$XL" self install
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
xlings update
xlings install -y
mcpp build
Expand Down
Loading