diff --git a/.github/actions/build/action.yml b/.github/actions/setup-rust/action.yaml similarity index 52% rename from .github/actions/build/action.yml rename to .github/actions/setup-rust/action.yaml index 1383507..c687212 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/setup-rust/action.yaml @@ -1,5 +1,5 @@ -name: Build -description: Builds the index +name: Setup rust +description: Installs rust for cross-compilation on ARM runs: using: "composite" @@ -8,21 +8,8 @@ runs: shell: bash run: sudo apt-get update && sudo apt-get install --assume-yes --no-install-recommends g++-aarch64-linux-gnu - - name: Setup environment - shell: bash - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Install rust shell: bash run: | rustup toolchain install stable --profile minimal rustup target add aarch64-unknown-linux-gnu - - - name: Setup cache - uses: Swatinem/rust-cache@v2 - - - name: Build - shell: bash - id: build - run: | - cargo build --release --target aarch64-unknown-linux-gnu diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 73ae359..41091de 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,8 +14,17 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Setup rust + uses: ./.github/actions/setup-rust + + - name: Setup cache + uses: Swatinem/rust-cache@v2 + - name: Build - uses: ./.github/actions/build + shell: bash + id: build + run: | + cargo build --release --target aarch64-unknown-linux-gnu - name: Upload artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f5a8041..e076746 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -12,8 +12,17 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Setup rust + uses: ./.github/actions/setup-rust + + - name: Setup cache + uses: Swatinem/rust-cache@v2 + - name: Build - uses: ./.github/actions/build + shell: bash + id: build + run: | + cargo build --release --target aarch64-unknown-linux-gnu - name: Create ssh key run: |