Skip to content

Commit

Permalink
Update CI.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Deecellar authored Mar 6, 2024
1 parent d37007f commit f165ffe
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,41 @@ jobs:

- name: Run Tests
run: zig build test

- name: Build artifacts
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
declare -a targets=("x86_64-windows" "x86_64-linux" "x86_64-macos" "aarch64-macos")
mkdir -p "artifacts/"
for target in "${targets[@]}"; do
mkdir -p artifacts/$target
echo "Building target ${target}..."
zig build -Dtarget=${target} -Doptimize=ReleaseSafe --prefix artifacts/${target}/ &
sed -e '1,5d' < README.md > artifacts/${target}/README.md
cp LICENSE artifacts/${target}/
done
wait
- name: Upload artifacts Target Windows
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2
with:
name: builds
path: artifacts/x86_64-windows
- name: Upload artifacts Target Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2
with:
name: builds
path: artifacts/x86_64-linux
- name: Upload artifacts Target MacOS
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2
with:
name: builds
path: artifacts/x86_64-macos
- name: Upload artifacts Target MacOS 2
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2
with:
name: builds
path: artifacts/aarch64-macos

0 comments on commit f165ffe

Please sign in to comment.