Skip to content

Commit

Permalink
chore: add linux and M1 as a build target
Browse files Browse the repository at this point in the history
  • Loading branch information
graeme-lockley committed May 12, 2024
1 parent 4831929 commit 6275ebe
Showing 1 changed file with 65 additions and 11 deletions.
76 changes: 65 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
run: |
zig build run -- ./bin/rebo-test
'upload-darwin-xxxxxx-artefact':
runs-on: macos-13
'upload-x86_64-linux-artefacts':
runs-on: ubuntu-latest
needs:
- build

Expand All @@ -41,35 +41,89 @@ jobs:
uses: korandoru/setup-zig@v1
with:
zig-version: 0.12.0 # released versions or master

- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Build binary
- name: Build -target x86_64-linux
run: |
zig build-exe ./src/main.zig -O ReleaseFast -fstrip
- name: Show hardware info
- name: Upload x86_64-linux artifact
run: |
uname -a
uname -m
ls -Fal
az storage blob upload \
--account-name littlelanguages \
--container-name rebo \
--name x86_64-linux \
--type block \
--tier hot \
--file ./main --overwrite
'upload-x86_64-darwin-artefacts':
runs-on: macos-13
needs:
- build

steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Install zig
uses: korandoru/setup-zig@v1
with:
zig-version: 0.12.0 # released versions or master

- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Upload artifact
- name: Build target
run: |
zig build-exe ./src/main.zig -O ReleaseFast -fstrip
- name: Upload x86_64-darwin artifact
run: |
az storage blob upload \
--account-name littlelanguages \
--container-name rebo \
--name darwin-x86_64 \
--name x86_64-darwin \
--type block \
--tier hot \
--file ./main --overwrite
'upload-aarch64-darwin-artefacts':
runs-on: macos-14
needs:
- build

steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Install zig
uses: korandoru/setup-zig@v1
with:
zig-version: 0.12.0 # released versions or master

- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Build target
run: |
zig build-exe ./src/main.zig -O ReleaseFast -fstrip
- name: Upload x86_64-darwin artifact
run: |
az storage blob upload \
--account-name littlelanguages \
--container-name rebo \
--name darwin-aarch64 \
--name aarch64-darwin \
--type block \
--tier hot \
--file ./main --overwrite

0 comments on commit 6275ebe

Please sign in to comment.