name: Publish Client Libraries on: push: branches: - master jobs: build_test_deploy: continue-on-error: true strategy: matrix: include: # Linux - platform: ubuntu-latest target: x86_64-unknown-linux-musl tests: true - platform: ubuntu-latest target: armv7-unknown-linux-musleabihf - platform: ubuntu-latest target: aarch64-unknown-linux-musl tests: true rustflags: -C link-arg=-lgcc # from https://github.com/rust-embedded/cross/blob/master/docker/Dockerfile.aarch64-unknown-linux-musl - platform: ubuntu-latest target: arm-unknown-linux-musleabi tests: true - platform: ubuntu-latest target: arm-linux-androideabi - platform: ubuntu-latest target: aarch64-linux-android - platform: ubuntu-latest target: i686-unknown-linux-musl tests: true - platform: ubuntu-latest target: i586-unknown-linux-musl tests: true - platform: ubuntu-latest target: x86_64-unknown-freebsd cc: x86_64-unknown-freebsd12-gcc # Apple - platform: macos-latest target: x86_64-apple-darwin tests: false - platform: macos-latest target: x86_64-apple-ios - platform: macos-latest target: aarch64-apple-darwin tests: false # Windows - platform: windows-latest target: x86_64-pc-windows-msvc tests: true rustflags: -C target-feature=+crt-static - platform: windows-latest target: i686-pc-windows-msvc rustflags: -C target-feature=+crt-static # iSH (https://ish.app/) - platform: ubuntu-latest target: i686-unknown-linux-musl client_binary_name: ish tests: false rustflags: -C target-feature=-mmx,-sse,-sse2 --cfg tls_only_aes_gcm runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 - run: ./install-deps.sh working-directory: tunshell-client/build shell: bash env: TEMPDIR: /tmp - run: ./compile.sh ${{ matrix.target }} $PWD/artifacts/client working-directory: tunshell-client/build shell: bash env: RUN_TESTS: ${{ matrix.tests }} RUST_TEST_THREADS: 1 CI: true RUST_LOG: debug RUSTFLAGS: ${{ matrix.rustflags }} CC: ${{ matrix.cc }} - uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.ARTIFACT_AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.ARTIFACT_AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 # Deploy artifact to https://artifacts.tunshell.com - name: Deploy to S3 run: > aws s3 cp $PWD/artifacts/client s3://tunshell-artifacts/client-${{ matrix.client_binary_name || matrix.target }} --acl=public-read --cache-control max-age=31536000 --metadata "sha256=$(openssl sha256 -r $PWD/artifacts/client | awk '{print $1}')" --metadata-directive REPLACE working-directory: tunshell-client/build shell: bash - name: Invalidate CloudFront run: aws cloudfront create-invalidation --distribution-id=E3DF4SGU15BNWT --paths '/*'