this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Start using cross again for musl builds

authored by

Marcin Puc and committed by
Louis Pilfold
e203a745 fa4eba53

+22 -79
+12 -25
.github/workflows/ci.yaml
··· 11 11 CARGO_INCREMENTAL: 0 12 12 CARGO_PROFILE_DEV_DEBUG: 0 13 13 CARGO_PROFILE_TEST_DEBUG: 0 14 + CROSS_CONTAINER_UID: 0 14 15 15 16 jobs: 16 17 test: ··· 19 20 strategy: 20 21 matrix: 21 22 toolchain: [stable] 22 - build: [linux-amd64, macos, windows] 23 + build: [linux-amd64-gnu, linux-amd64-musl, macos, windows] 23 24 include: 24 - - build: linux-amd64 25 + - build: linux-amd64-gnu 25 26 os: ubuntu-latest 26 27 target: x86_64-unknown-linux-gnu 28 + use-cross: false 29 + - build: linux-amd64-musl 30 + os: ubuntu-latest 31 + target: x86_64-unknown-linux-musl 32 + use-cross: true 27 33 - build: macos 28 34 os: macos-latest 29 35 target: x86_64-apple-darwin 36 + use-cross: false 30 37 - build: windows 31 38 os: windows-latest 32 39 target: x86_64-pc-windows-msvc 40 + use-cross: false 33 41 steps: 34 42 - name: Checkout repository 35 43 uses: actions/checkout@v2 ··· 52 60 uses: actions-rs/cargo@v1 53 61 with: 54 62 command: test 55 - args: --workspace 56 - 57 - test-musl: 58 - runs-on: ubuntu-latest 59 - steps: 60 - - name: Checkout repository 61 - uses: actions/checkout@v2 62 - 63 - - name: Link to predefined musl toolchain 64 - run: | 65 - ln -s /root/.cargo $HOME/.cargo 66 - ln -s /root/.rustup $HOME/.rustup 67 - 68 - - name: Handle Rust dependencies caching 69 - uses: Swatinem/rust-cache@v1 70 - with: 71 - key: v1-linux-musl 72 - 73 - - name: Run tests 74 - uses: actions-rs/cargo@v1 75 - with: 76 - command: test 77 - args: --workspace 63 + args: "--workspace --target ${{ matrix.target }}" 64 + use-cross: ${{ matrix.use-cross }} 78 65 79 66 test-wasm: 80 67 runs-on: ubuntu-latest
+9 -53
.github/workflows/release.yaml
··· 15 15 strategy: 16 16 matrix: 17 17 build: 18 + - linux-amd64 18 19 - macos 19 20 - macos-arm64 20 21 - windows-64bit 21 22 toolchain: [stable] 22 23 include: 24 + - build: linux-amd64 25 + os: ubuntu-latest 26 + target: x86_64-unknown-linux-musl 27 + use-cross: true 23 28 - build: macos 24 29 os: macos-latest 25 30 target: x86_64-apple-darwin 31 + use-cross: false 26 32 - build: macos-arm64 27 33 os: macos-11 28 34 target: aarch64-apple-darwin 35 + use-cross: false 29 36 - build: windows-64bit 30 37 os: windows-latest 31 38 target: x86_64-pc-windows-msvc 39 + use-cross: false 32 40 steps: 33 41 - name: Checkout repository 34 42 uses: actions/checkout@v2 ··· 52 60 with: 53 61 command: build 54 62 args: --release --target ${{ matrix.target }} 63 + use-cross: ${{ matrix.use-cross }} 55 64 56 65 - name: Build archive 57 66 shell: bash ··· 97 106 ${{ env.ASSET }} 98 107 ${{ env.ASSET }}.sha256 99 108 ${{ env.ASSET }}.sha512 100 - 101 - build-release-musl: 102 - runs-on: ubuntu-latest 103 - container: clux/muslrust:stable 104 - steps: 105 - - name: Checkout repository 106 - uses: actions/checkout@v2 107 - 108 - - name: Link to predefined musl toolchain 109 - run: | 110 - ln -s /root/.cargo $HOME/.cargo 111 - ln -s /root/.rustup $HOME/.rustup 112 - 113 - - name: Handle Rust dependencies caching 114 - uses: Swatinem/rust-cache@v1 115 - with: 116 - key: v1-linux-musl 117 - 118 - - name: Build release binary 119 - uses: actions-rs/cargo@v1 120 - with: 121 - command: build 122 - args: --release 123 - 124 - - name: Build archive 125 - shell: bash 126 - run: | 127 - VERSION="${GITHUB_REF#refs/tags/}" 128 - 129 - ARCHIVE="gleam-$VERSION-linux-amd64.tar.gz" 130 - cp "target/x86_64-unknown-linux-musl/release/gleam" "gleam" 131 - tar -czvf "$ARCHIVE" "gleam" 132 - openssl dgst -r -sha256 -out "$ARCHIVE".sha256 "$ARCHIVE" 133 - openssl dgst -r -sha512 -out "$ARCHIVE".sha512 "$ARCHIVE" 134 - echo "ASSET=$ARCHIVE" >> $GITHUB_ENV 135 - 136 - - name: Ensure binary successfully boots 137 - shell: bash 138 - run: | 139 - tar -xvzf "$ASSET" 140 - ./gleam --version 141 - 142 - - name: Upload release archive 143 - uses: softprops/action-gh-release@v1 144 - with: 145 - token: ${{ secrets.GITHUB_TOKEN }} 146 - draft: true 147 - prerelease: false 148 - fail_on_unmatched_files: true 149 - files: | 150 - ${{ env.ASSET }} 151 - ${{ env.ASSET }}.sha256 152 - ${{ env.ASSET }}.sha512
+1 -1
Cross.toml
··· 1 1 [target.x86_64-unknown-linux-musl] 2 - image = "clux/muslrust" 2 + image = "clux/muslrust:stable"