9 CARGO_TERM_COLOR: always
17 - runner: ubuntu-latest
19 musl-target: x86_64-unknown-linux-musl
20 - runner: ubuntu-24.04-arm
22 musl-target: aarch64-unknown-linux-musl
23 - runner: macos-latest
27 runs-on: ${{ matrix.runner }}
29 - uses: actions/checkout@v4
31 - uses: actions/checkout@v4
33 repository: ilyakooo0/knot
36 - uses: dtolnay/rust-toolchain@stable
38 - name: Install musl toolchain
39 if: runner.os == 'Linux'
42 sudo apt-get install -y musl-tools
43 rustup target add ${{ matrix.musl-target }}
45 - uses: actions/cache@v4
51 key: ${{ matrix.name }}-cargo-${{ hashFiles('knot/Cargo.lock') }}
54 working-directory: knot
55 run: cargo build --release -p knot-compiler
57 - name: Build musl runtime
58 if: runner.os == 'Linux'
59 working-directory: knot
60 run: cargo build --release -p knot-runtime --target ${{ matrix.musl-target }}
62 - name: Compile server (Linux static)
63 if: runner.os == 'Linux'
65 printf '#!/bin/sh\nexec musl-gcc -static "$@"\n' > /tmp/static-cc
66 chmod +x /tmp/static-cc
68 KNOT_RUNTIME_LIB=${{ github.workspace }}/knot/target/${{ matrix.musl-target }}/release/libknot_runtime.a \
69 ./knot/target/release/knotc build server.knot
71 - name: Compile server (macOS)
72 if: runner.os == 'macOS'
73 run: ./knot/target/release/knotc build server.knot
78 - uses: actions/upload-artifact@v4
80 name: server-${{ matrix.name }}
85 if: github.ref == 'refs/heads/master' && github.event_name == 'push'
86 runs-on: ubuntu-latest
90 - uses: actions/download-artifact@v4
92 - uses: actions/checkout@v4
96 - name: Generate version
98 run: echo "tag=$(git -C repo log -1 --format='%cd' --date='format:%Y.%m.%d.%H%M')" >> "$GITHUB_OUTPUT"
100 - name: Prepare release assets
102 for dir in server-*/; do
104 mv "${dir}server" "${name}.tmp"
106 mv "${name}.tmp" "$name"
110 - uses: softprops/action-gh-release@v2
112 tag_name: ${{ steps.version.outputs.tag }}
113 name: ${{ steps.version.outputs.tag }}
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list