Update CI.yml

This commit is contained in:
rimuspp 2024-03-06 18:23:09 -05:00 committed by GitHub
parent f165ffe73f
commit c08fe7c1e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,7 +29,7 @@ jobs:
uses: goto-bus-stop/setup-zig@v2.2.0 uses: goto-bus-stop/setup-zig@v2.2.0
with: with:
version: master version: master
cache: false cache: true # Let's see how this behaves
- run: zig version - run: zig version
- run: zig env - run: zig env
@ -45,14 +45,16 @@ jobs:
run: | run: |
declare -a targets=("x86_64-windows" "x86_64-linux" "x86_64-macos" "aarch64-macos") declare -a targets=("x86_64-windows" "x86_64-linux" "x86_64-macos" "aarch64-macos")
mkdir -p "artifacts/" mkdir -p "artifacts/"
cd cli
for target in "${targets[@]}"; do for target in "${targets[@]}"; do
mkdir -p artifacts/$target mkdir -p ../artifacts/$target
echo "Building target ${target}..." echo "Building target ${target}..."
zig build -Dtarget=${target} -Doptimize=ReleaseSafe --prefix artifacts/${target}/ & zig build -Dtarget=${target} -Doptimize=ReleaseSafe --prefix ../artifacts/${target}/ &
sed -e '1,5d' < README.md > artifacts/${target}/README.md sed -e '1,5d' < ../README.md > ../artifacts/${target}/README.md
cp LICENSE artifacts/${target}/ cp ../LICENSE artifacts/${target}/
done done
wait wait
- name: Upload artifacts Target Windows - name: Upload artifacts Target Windows
if: ${{ matrix.os == 'ubuntu-latest' }} if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2