mirror of
https://github.com/bearlanguageorg/bear.git
synced 2026-08-26 15:37:18 +00:00
More buildins and vscode exstention <CO-AUthored, ai>
This commit is contained in:
@@ -19,6 +19,9 @@ jobs:
|
||||
- os: macos-latest
|
||||
artifact: vr-macos-arm64
|
||||
binary: vr
|
||||
- os: windows-latest
|
||||
artifact: vr-windows-amd64.exe
|
||||
binary: vr.exe
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
@@ -26,17 +29,30 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install V
|
||||
- name: Install V (unix)
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/vlang/v /tmp/v
|
||||
cd /tmp/v && make
|
||||
sudo ln -sf /tmp/v/v /usr/local/bin/v
|
||||
v version
|
||||
|
||||
- name: Install V (windows)
|
||||
if: runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
curl -L -o v_windows.zip https://github.com/vlang/v/releases/latest/download/v_windows.zip
|
||||
unzip -o v_windows.zip -d /tmp/vwin
|
||||
echo "/tmp/vwin/v" >> "$GITHUB_PATH"
|
||||
v version
|
||||
|
||||
- name: Build toolchain
|
||||
shell: bash
|
||||
run: v -o ${{ matrix.binary }} .
|
||||
|
||||
- name: Smoke test
|
||||
shell: bash
|
||||
run: ./${{ matrix.binary }} run examples/hello.vr
|
||||
|
||||
- name: Upload artifact
|
||||
@@ -57,7 +73,7 @@ jobs:
|
||||
- name: Verify tag matches v.mod version
|
||||
run: |
|
||||
TAG="${GITHUB_REF#refs/tags/v}"
|
||||
MOD_VERSION=$(grep -oP "version: '\K[^"]+" v.mod)
|
||||
MOD_VERSION=$(grep -oP "version: '\\K[^\"]+" v.mod)
|
||||
if [ "$TAG" != "$MOD_VERSION" ]; then
|
||||
echo "::error::Tag version (v${TAG}) does not match v.mod version (${MOD_VERSION})"
|
||||
exit 1
|
||||
@@ -74,7 +90,7 @@ jobs:
|
||||
mkdir -p release
|
||||
for dir in artifacts/*/; do
|
||||
name=$(basename "$dir")
|
||||
cp "$dir"/vr release/"$name"
|
||||
cp "$dir"/* release/"$name"
|
||||
chmod +x release/"$name"
|
||||
done
|
||||
ls -lh release/
|
||||
|
||||
Reference in New Issue
Block a user