| 1 | name: CI |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [master] |
| 6 | |
| 7 | jobs: |
| 8 | release: |
| 9 | runs-on: ubuntu-latest |
| 10 | |
| 11 | steps: |
| 12 | - uses: actions/checkout@v2 |
| 13 | with: |
| 14 | fetch-depth: 0 |
| 15 | submodules: "recursive" |
| 16 | - run: git fetch --all --tags |
| 17 | - run: top -b -n 1 | head -n5 |
| 18 | |
| 19 | - name: Setup Zig |
| 20 | uses: mlugg/setup-zig@v2 |
| 21 | with: |
| 22 | mirror: "http://mirrors.nektro.net/s3cgi" |
| 23 | version: "0.16.0" |
| 24 | |
| 25 | - run: zig version |
| 26 | - run: zig env |
| 27 | - run: zig build -j1 |
| 28 | - run: echo "$PWD/zig-out/bin" >> $GITHUB_PATH |
| 29 | |
| 30 | # Test |
| 31 | - run: zigmod version |
| 32 | - run: zigmod ci |
| 33 | - run: git diff <(cat __snapshots__/explain.tree.txt) <(zigmod explain --locked --format tree) |
| 34 | - run: git diff <(cat __snapshots__/explain.mermaid.txt) <(zigmod explain --locked --format mermaid) |
| 35 | - run: git diff <(cat __snapshots__/explain.dot.txt) <(zigmod explain --locked --format dot) |
| 36 | |
| 37 | - run: zigmod zpm tags |
| 38 | |
| 39 | - run: ./test_repo.sh https://github.com/nektro/zigmod-test-basic |
| 40 | - run: ./test_repo.sh https://github.com/nektro/zigmod-test-git-dep |
| 41 | - run: ./test_repo.sh https://github.com/nektro/zigmod-test-hg-dep |
| 42 | - run: ./test_repo.sh https://github.com/nektro/zigmod-test-http-dep |
| 43 | - run: ./test_repo.sh https://github.com/nektro/zigmod-test-systemlib-dep |
| 44 | - run: ./test_repo.sh https://github.com/nektro/zigmod-test-local-dep |
| 45 | - run: ./test_repo.sh https://github.com/nektro/zigmod-test-c-code |
| 46 | |
| 47 | # Build All |
| 48 | - run: ./build_release.sh x86_64-linux-musl |
| 49 | - run: ./build_release.sh x86_64-macos-none |
| 50 | |
| 51 | - run: ./build_release.sh aarch64-linux-musl |
| 52 | - run: ./build_release.sh aarch64-macos-none |
| 53 | |
| 54 | - run: ./build_release.sh riscv64-linux-musl |
| 55 | |
| 56 | - run: ./build_release.sh powerpc64le-linux-musl |
| 57 | |
| 58 | - run: ./build_release.sh mips64el-linux-muslabi64 |
| 59 | |
| 60 | # Github Release |
| 61 | - run: ./changelog.sh |
| 62 | - run: ./make_release.sh ${{ secrets.GITHUB_TOKEN }} |